GLES: fix use of uninitialized variables in ogl_texture_stats()
Querying GL_INDEX_BITS and GL_DOUBLEBUFFER is not allowed in GLES, so just use a reasonable default values for both. This is only used to estimate memory consumption by the framebuffer (which is a questionable approach in itself, since all those are implementation details not exposed by the GL, and the actual memory used is likely to be higher anyway).
This commit is contained in:
parent
49e7cfe37e
commit
1c01698e88
|
@ -288,6 +288,8 @@ static void ogl_texture_stats(void)
|
|||
res = SWIDTH * SHEIGHT;
|
||||
#ifndef OGLES
|
||||
glGetIntegerv(GL_INDEX_BITS, &idx);
|
||||
#else
|
||||
idx=16;
|
||||
#endif
|
||||
glGetIntegerv(GL_RED_BITS, &r);
|
||||
glGetIntegerv(GL_GREEN_BITS, &g);
|
||||
|
@ -295,6 +297,8 @@ static void ogl_texture_stats(void)
|
|||
glGetIntegerv(GL_ALPHA_BITS, &a);
|
||||
#ifndef OGLES
|
||||
glGetIntegerv(GL_DOUBLEBUFFER, &dbl);
|
||||
#else
|
||||
dbl=1;
|
||||
#endif
|
||||
dbl += 1;
|
||||
glGetIntegerv(GL_DEPTH_BITS, &depth);
|
||||
|
|
Loading…
Reference in a new issue