Winlayer: Bound code with USE_GLEXT where missed in r5526.

Also make some dead GL debugging code not dead during debug builds.

git-svn-id: https://svn.eduke32.com/eduke32@5550 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-01-12 10:30:40 +00:00
parent c52b90a0a2
commit da1081112c

View file

@ -1715,7 +1715,7 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
if (gammabrightness && setgamma() < 0) gammabrightness = 0; if (gammabrightness && setgamma() < 0) gammabrightness = 0;
} }
#ifdef USE_OPENGL #if defined USE_OPENGL && defined USE_GLEXT
if (hGLWindow && glinfo.vsync) bwglSwapIntervalEXT(vsync_render); if (hGLWindow && glinfo.vsync) bwglSwapIntervalEXT(vsync_render);
#endif #endif
if (inp) AcquireInputDevices(1); if (inp) AcquireInputDevices(1);
@ -1752,7 +1752,9 @@ void setvsync(int32_t sync)
return; return;
} }
vsync_render = sync; vsync_render = sync;
# ifdef USE_GLEXT
bwglSwapIntervalEXT(sync); bwglSwapIntervalEXT(sync);
# endif
} }
static void cdsenummodes(void) static void cdsenummodes(void)
@ -2760,9 +2762,10 @@ static int32_t SetupOpenGL(int32_t width, int32_t height, int32_t bitspp)
loadglextensions(); loadglextensions();
# if defined DEBUGGINGAIDS && defined USE_GLEXT
// We should really be checking for the new WGL extension string instead // We should really be checking for the new WGL extension string instead
// Enable this to leverage ARB_debug_output // Enable this to leverage ARB_debug_output
if (bwglCreateContextAttribsARB && 0) { if (bwglCreateContextAttribsARB) {
HGLRC debuggingContext = hGLRC; HGLRC debuggingContext = hGLRC;
// This corresponds to WGL_CONTEXT_FLAGS_ARB set to WGL_CONTEXT_DEBUG_BIT_ARB // This corresponds to WGL_CONTEXT_FLAGS_ARB set to WGL_CONTEXT_DEBUG_BIT_ARB
@ -2783,6 +2786,7 @@ static int32_t SetupOpenGL(int32_t width, int32_t height, int32_t bitspp)
loadglextensions(); loadglextensions();
} }
} }
# endif
polymost_glreset(); polymost_glreset();