From bf2735cd53f13d22cf4e6013a251896a3d411b97 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 3 Jan 2016 13:54:21 +0100 Subject: OPENGL: Detect NPOT support for GLES. For GLES1+ there exists GL_OES_texture_npot, which indicates that there is NPOT support. GLES2 always had (limited) NPOT support, which is all we require, thus we always enable it. --- backends/graphics/opengl/context.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'backends/graphics/opengl') diff --git a/backends/graphics/opengl/context.cpp b/backends/graphics/opengl/context.cpp index 478d98c19a..c149b12f19 100644 --- a/backends/graphics/opengl/context.cpp +++ b/backends/graphics/opengl/context.cpp @@ -194,7 +194,7 @@ void OpenGLGraphicsManager::initializeGLContext() { while (!tokenizer.empty()) { Common::String token = tokenizer.nextToken(); - if (token == "GL_ARB_texture_non_power_of_two") { + if (token == "GL_ARB_texture_non_power_of_two" || token == "GL_OES_texture_npot") { g_context.NPOTSupported = true; } else if (token == "GL_ARB_shader_objects") { ARBShaderObjects = true; @@ -214,6 +214,9 @@ void OpenGLGraphicsManager::initializeGLContext() { } if (g_context.type == kContextGLES2) { + // GLES2 always has (limited) NPOT support. + g_context.NPOTSupported = true; + // GLES2 always has shader support. g_context.shadersSupported = true; -- cgit v1.2.3