From 823ea36ffe84da4758f434c253f6d6103a2f0822 Mon Sep 17 00:00:00 2001 From: Robert Beckebans Date: Sun, 16 Dec 2012 12:22:07 +0100 Subject: [PATCH] Added support for OpenGL 3.2 context debugging using SDL 2.0 --- neo/sys/sdl/sdl_glimp.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/neo/sys/sdl/sdl_glimp.cpp b/neo/sys/sdl/sdl_glimp.cpp index b0224c00..8ecf236d 100644 --- a/neo/sys/sdl/sdl_glimp.cpp +++ b/neo/sys/sdl/sdl_glimp.cpp @@ -185,6 +185,11 @@ bool GLimp_Init( glimpParms_t parms ) { SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION, 3 ); SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION, 2 ); + + if( r_debugContext.GetBool() ) + { + SDL_GL_SetAttribute( SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG ); + } } if( r_useOpenGL32.GetInteger() > 1 ) @@ -253,7 +258,7 @@ bool GLimp_Init( glimpParms_t parms ) if( !window ) { - common->Warning( "No usable GL mode found: %s", SDL_GetError() ); + common->Printf( "No usable GL mode found: %s", SDL_GetError() ); return false; }