git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2414
d7cf8633-e32d-0410-b094-
e92efae38249
{"wglDeleteContext", (void **) &qwglDeleteContext},
{"wglGetProcAddress", (void **) &qwglGetProcAddress},
{"wglMakeCurrent", (void **) &qwglMakeCurrent},
{"wglDeleteContext", (void **) &qwglDeleteContext},
{"wglGetProcAddress", (void **) &qwglGetProcAddress},
{"wglMakeCurrent", (void **) &qwglMakeCurrent},
+ {"wglGetCurrentContext", (void **) &qwglGetCurrentContext},
+ {"wglGetCurrentDC", (void **) &qwglGetCurrentDC},
static DEVMODE gdevmode;
static qboolean vid_initialized = false;
static qboolean windowed, leavecurrentmode;
static DEVMODE gdevmode;
static qboolean vid_initialized = false;
static qboolean windowed, leavecurrentmode;
-static qboolean vid_canalttab = false;
static qboolean vid_wassuspended = false;
static int vid_usingmouse;
extern qboolean mouseactive; // from in_win.c
static qboolean vid_wassuspended = false;
static int vid_usingmouse;
extern qboolean mouseactive; // from in_win.c
- int i;
- GLuint temp[8192];
- vid_canalttab = false;
- hRC = qwglGetCurrentContext();
- hDC = qwglGetCurrentDC();
-
- qwglMakeCurrent(NULL, NULL);
+ if (qwglGetCurrentContext)
+ hRC = qwglGetCurrentContext();
+ if (qwglGetCurrentDC)
+ hDC = qwglGetCurrentDC();
- // LordHavoc: free textures before closing (may help NVIDIA)
- for (i = 0;i < 8192;i++)
- temp[i] = i+1;
- qglDeleteTextures(8192, temp);
+ if (qwglMakeCurrent)
+ qwglMakeCurrent(NULL, NULL);
+ if (hRC && qwglDeleteContext)
qwglDeleteContext(hRC);
// close the library before we get rid of the window
qwglDeleteContext(hRC);
// close the library before we get rid of the window
{
if (modestate == MS_FULLDIB)
{
{
if (modestate == MS_FULLDIB)
{
- if (vid_canalttab && vid_wassuspended)
{
vid_wassuspended = false;
ChangeDisplaySettings (&gdevmode, CDS_FULLSCREEN);
{
vid_wassuspended = false;
ChangeDisplaySettings (&gdevmode, CDS_FULLSCREEN);
vid_usingmouse = false;
IN_DeactivateMouse ();
IN_ShowMouse ();
vid_usingmouse = false;
IN_DeactivateMouse ();
IN_ShowMouse ();
- if (modestate == MS_FULLDIB && vid_canalttab)
+ if (modestate == MS_FULLDIB)
{
ChangeDisplaySettings (NULL, 0);
vid_wassuspended = true;
{
ChangeDisplaySettings (NULL, 0);
vid_wassuspended = true;
if (!qwglMakeCurrent( maindc, baseRC ))
Sys_Error ("wglMakeCurrent failed");
if (!qwglMakeCurrent( maindc, baseRC ))
Sys_Error ("wglMakeCurrent failed");
+ qglGetString = GL_GetProcAddress("glGetString");
+ if (qglGetString == NULL)
+ Sys_Error ("glGetString does not exist");
gl_renderer = qglGetString(GL_RENDERER);
gl_vendor = qglGetString(GL_VENDOR);
gl_version = qglGetString(GL_VERSION);
gl_renderer = qglGetString(GL_RENDERER);
gl_vendor = qglGetString(GL_VENDOR);
gl_version = qglGetString(GL_VERSION);
vid_menukeyfn = VID_MenuKey;
strcpy (badmode.modedesc, "Bad mode");
vid_menukeyfn = VID_MenuKey;
strcpy (badmode.modedesc, "Bad mode");