summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r--src/opengl/qgl.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 08b9ca3..2fc3dea 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -5499,7 +5499,8 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions()
glExtensions |= NVFloatBuffer;
if (extensions.match("GL_ARB_pixel_buffer_object"))
glExtensions |= PixelBufferObject;
- if (extensions.match("GL_IMG_texture_format_BGRA8888"))
+ if (extensions.match("GL_IMG_texture_format_BGRA8888")
+ || extensions.match("GL_EXT_texture_format_BGRA8888"))
glExtensions |= BGRATextureFormat;
#if defined(QT_OPENGL_ES_2)
glExtensions |= FramebufferObject;
@@ -5540,6 +5541,9 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions()
glGetBooleanv(FRAMEBUFFER_SRGB_CAPABLE_EXT, &srgbCapableFramebuffers);
if (srgbCapableFramebuffers)
glExtensions |= SRGBFrameBuffer;
+ // Clear possible error which is generated if
+ // FRAMEBUFFER_SRGB_CAPABLE_EXT isn't supported.
+ glGetError();
}
return glExtensions;