From 18306ee20602e79a2af4556658dc0f141a4ad78f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 3 Jan 2016 12:50:51 +0100 Subject: OPENGL: Simplify shader support checks. --- backends/graphics/opengl/opengl-graphics.cpp | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'backends/graphics/opengl/opengl-graphics.cpp') diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 7f4fcf73bb..d9c9377e51 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -773,8 +773,7 @@ void OpenGLGraphicsManager::setActualScreenSize(uint width, uint height) { }; #if !USE_FORCED_GL && !USE_FORCED_GLES && !USE_FORCED_GLES2 - if (g_context.type == kContextGLES - || (g_context.type == kContextGL && !g_context.shadersSupported)) { + if (!g_context.shadersSupported) { #endif #if !USE_FORCED_GLES2 GL_CALL(glMatrixMode(GL_PROJECTION)); @@ -901,23 +900,9 @@ void OpenGLGraphicsManager::notifyContextCreate(const Graphics::PixelFormat &def #if !USE_FORCED_GLES if (!_shader) { -#if !USE_FORCED_GL && !USE_FORCED_GLES2 - if (g_context.type == kContextGLES2) { -#endif -#if !USE_FORCED_GL + if (g_context.shadersSupported) { _shader = new Shader(g_defaultVertexShader, g_defaultFragmentShader); -#endif -#if !USE_FORCED_GL && !USE_FORCED_GLES2 - } else { -#endif -#if !USE_FORCED_GLES2 - if (g_context.shadersSupported) { - _shader = new Shader(g_defaultVertexShader, g_defaultFragmentShader); - } -#endif -#if !USE_FORCED_GL && !USE_FORCED_GLES2 } -#endif } #endif -- cgit v1.2.3