Difference for arch/win32/glinit.c from version 1.1 to 1.2


version 1.1 version 1.2
Line 1
 
Line 1
   #include "ogl_init.h"
   
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
Line 21
 
Line 23
 HGLRC hRC;  HGLRC hRC;
   
 // Enable OpenGL  // Enable OpenGL
   /*
 VOID EnableOpenGL( HWND hWnd, HDC * hDC, HGLRC * hRC )  VOID EnableOpenGL( HWND hWnd, HDC * hDC, HGLRC * hRC )
 {  {
   PIXELFORMATDESCRIPTOR pfd;    PIXELFORMATDESCRIPTOR pfd;
Line 38
 
Line 40
     PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;      PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
   pfd.iPixelType = PFD_TYPE_RGBA;    pfd.iPixelType = PFD_TYPE_RGBA;
   pfd.cColorBits = 24;    pfd.cColorBits = 24;
   pfd.cDepthBits = 16;    //pfd.cDepthBits = 16;
     pfd.cDepthBits = 0;//we don't use depth buffering.
   pfd.iLayerType = PFD_MAIN_PLANE;    pfd.iLayerType = PFD_MAIN_PLANE;
   iFormat = ChoosePixelFormat( *hDC, &pfd );    iFormat = ChoosePixelFormat( *hDC, &pfd );
   SetPixelFormat( *hDC, iFormat, &pfd );    SetPixelFormat( *hDC, iFormat, &pfd );
   
   #ifdef OGL_RUNTIME_LOAD
     ogl_init_load_library();
   #endif
   
   // create and enable the render context (RC)    // create and enable the render context (RC)
   *hRC = wglCreateContext( *hDC );    *hRC = wglCreateContext( *hDC );
   wglMakeCurrent( *hDC, *hRC );    wglMakeCurrent( *hDC, *hRC );
Line 57
 
Line 64
   wglDeleteContext( hRC );    wglDeleteContext( hRC );
   ReleaseDC( hWnd, hDC );    ReleaseDC( hWnd, hDC );
 }  }
   */
 static void finiObjects()  static void finiObjects()
 {  {
    if(mouse_hidden)     if(mouse_hidden)
     ShowCursor(TRUE);      ShowCursor(TRUE);
   
    DisableOpenGL( g_hWnd, hDC, hRC );   //  DisableOpenGL( g_hWnd, hDC, hRC );
 }   }
   
   
Line 137
 
Line 144
  g_hWnd = CreateWindowEx(0,   g_hWnd = CreateWindowEx(0,
                                   "WinD1X",                                    "WinD1X",
    "Descent",     "Descent",
                                   WS_OVERLAPPED | WS_BORDER,   WS_POPUP | WS_SYSMENU,
   // WS_OVERLAPPED | WS_BORDER,
    0, 0,     0, 0,
    GetSystemMetrics(SM_CXSCREEN),     GetSystemMetrics(SM_CXSCREEN),
    GetSystemMetrics(SM_CYSCREEN),     GetSystemMetrics(SM_CYSCREEN),
Line 151
 
Line 159
  ShowWindow(g_hWnd,SW_SHOWNORMAL);   ShowWindow(g_hWnd,SW_SHOWNORMAL);
  UpdateWindow(g_hWnd);   UpdateWindow(g_hWnd);
   
         EnableOpenGL( g_hWnd, &hDC, &hRC);   //        EnableOpenGL( g_hWnd, &hDC, &hRC);
 }  }
   
 extern void key_init(void);  extern void key_init(void);

Legend:
line(s) removed in v.1.1 
line(s) changed
 line(s) added in v.1.2