path: root/src/opengl
diff options
authorSean Harmer <>2012-11-30 10:48:54 +0000
committerThe Qt Project <>2012-12-01 08:29:14 +0100
commita7c9d5ca9c754902baa0fa5a6ba8b28864611ca5 (patch)
tree50da0e506f34887001d016cc0db7b34d69becba6 /src/opengl
parent5573a44f689ef92873a55fccf7f2752b43243de5 (diff)
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 <>
Diffstat (limited to 'src/opengl')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 583ecb69a8..8c98a0ea3a 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -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;
return glExtensions;