aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl
diff options
context:
space:
mode:
authorJohannes Schickel2016-01-03 13:54:21 +0100
committerJohannes Schickel2016-03-16 20:29:26 +0100
commitbf2735cd53f13d22cf4e6013a251896a3d411b97 (patch)
treeb1e5876b8e68db4fb0876dd23915a1f00bd2d294 /backends/graphics/opengl
parent18306ee20602e79a2af4556658dc0f141a4ad78f (diff)
downloadscummvm-rg350-bf2735cd53f13d22cf4e6013a251896a3d411b97.tar.gz
scummvm-rg350-bf2735cd53f13d22cf4e6013a251896a3d411b97.tar.bz2
scummvm-rg350-bf2735cd53f13d22cf4e6013a251896a3d411b97.zip
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.
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r--backends/graphics/opengl/context.cpp5
1 files changed, 4 insertions, 1 deletions
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;