Skip to content
This repository has been archived by the owner on Jul 24, 2022. It is now read-only.

Commit

Permalink
Actually read GL_MAX_TEXTURE_SIZE for max size
Browse files Browse the repository at this point in the history
  • Loading branch information
emileb authored and madame-rachelle committed May 24, 2021
1 parent 8a71e75 commit 41eef5c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/common/rendering/gles/gles_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 41eef5c

Please sign in to comment.