OpenGL: Remove bogus error in textures example on ES 2 platforms

The call to glGetBooleanv(GL_FRAMEBUFFER_SRGB_CAPABLE_EXT) in
QGLExtensions::currentContextExtensions() was resulting in an invalid
enum on ES 2 systems. This was not being cleared and subsequentally
being interpreted as a failed texture upload in the textures example.

This enum doesn't exist on ES 2 so don't query it.

Change-Id: I84f9c4b0aa8b11b6036eeed1f9378d110d9ea69d
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
Sean Harmer 2012-11-30 10:48:54 +00:00 committed by The Qt Project
parent 5573a44f68
commit a7c9d5ca9c

View File

@ -4798,12 +4798,14 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions()
if (extensions.match("GL_EXT_bgra"))
glExtensions |= BGRATextureFormat;
#if !defined(QT_OPENGL_ES)
{
GLboolean srgbCapableFramebuffers = false;
glGetBooleanv(GL_FRAMEBUFFER_SRGB_CAPABLE_EXT, &srgbCapableFramebuffers);
if (srgbCapableFramebuffers)
glExtensions |= SRGBFrameBuffer;
}
#endif
return glExtensions;
}