]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_sdl.c
Add gl_debug cvar, if enabled the GL context will have GL_ARB_debug_output enabled...
[xonotic/darkplaces.git] / vid_sdl.c
index f01a4e85da2caa9ebcc8e239898ccbd6b6fc8906..d47ffdb042d645ac259d1723f80203b9cddca09c 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -2018,6 +2018,8 @@ static qboolean VID_InitModeGL(viddef_mode_t *mode)
        SDL_GL_SetAttribute (SDL_GL_CONTEXT_MAJOR_VERSION, 2);
        SDL_GL_SetAttribute (SDL_GL_CONTEXT_MINOR_VERSION, 0);
        SDL_GL_SetAttribute (SDL_GL_RETAINED_BACKING, 1);
+#else
+       SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, (gl_debug.integer > 0 ? SDL_GL_CONTEXT_DEBUG_FLAG : 0));
 #endif
 
        video_bpp = mode->bitsperpixel;