diff options
Diffstat (limited to 'backends/graphics/opengl/context.cpp')
| -rw-r--r-- | backends/graphics/opengl/context.cpp | 13 | 
1 files changed, 12 insertions, 1 deletions
diff --git a/backends/graphics/opengl/context.cpp b/backends/graphics/opengl/context.cpp index c4869c2ae6..d1776f851d 100644 --- a/backends/graphics/opengl/context.cpp +++ b/backends/graphics/opengl/context.cpp @@ -28,15 +28,23 @@  namespace OpenGL {  void Context::reset() { +	ready = false; +	type = kContextGL;  	NPOTSupported = false;  }  Context g_context; -void OpenGLGraphicsManager::initializeGLContext() { +void OpenGLGraphicsManager::initializeGLContext(ContextType type) {  	// Initialize default state.  	g_context.reset(); +#if USE_FORCED_GL +	type = kContextGL; +#elif USE_FORCED_GLES +	type = kContextGLES; +#endif +  	// Load all functions.  	// We use horrible trickery to silence C++ compilers.  	// See backends/plugins/sdl/sdl-provider.cpp for more information. @@ -64,6 +72,9 @@ void OpenGLGraphicsManager::initializeGLContext() {  			g_context.NPOTSupported = true;  		}  	} + +	g_context.ready = true; +	g_context.type = type;  }  } // End of namespace OpenGL  | 
