diff --git a/src/common/rendering/gles/gles_system.cpp b/src/common/rendering/gles/gles_system.cpp index 10ef11b35..f58051e64 100644 --- a/src/common/rendering/gles/gles_system.cpp +++ b/src/common/rendering/gles/gles_system.cpp @@ -167,18 +167,20 @@ namespace OpenGLESRenderer gl_customshader = false; -#if USE_GLES2 + GLint maxTextureSize[1]; + glGetIntegerv(GL_MAX_TEXTURE_SIZE, maxTextureSize); + + gles.max_texturesize = maxTextureSize[0]; + Printf("GL_MAX_TEXTURE_SIZE: %d\n", gles.max_texturesize); + +#if USE_GLES2 gles.depthStencilAvailable = CheckExtension("GL_OES_packed_depth_stencil"); gles.npotAvailable = CheckExtension("GL_OES_texture_npot"); - - gles.max_texturesize = 1024 * 2; #else gles.depthStencilAvailable = true; gles.npotAvailable = true; gles.useMappedBuffers = true; - - gles.max_texturesize = 1024 * 2; #endif gles.numlightvectors = (gles.maxlights * LIGHT_VEC4_NUM);