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.
This commit is contained in:
Johannes Schickel 2016-01-03 13:54:21 +01:00
parent 18306ee206
commit bf2735cd53

View file

@ -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;