summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglextensions_p.h
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-07-15 15:29:29 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-07-26 08:57:11 (GMT)
commitd852e6164a4aaf8e235e97cba8f0e8e9b933987c (patch)
tree7577ad2b4c80bffab4212e49364ea77a949bd187 /src/opengl/qglextensions_p.h
parent5c1ec4373f63045c4c56f748e47612b3bfc9ab88 (diff)
downloadQt-d852e6164a4aaf8e235e97cba8f0e8e9b933987c.zip
Qt-d852e6164a4aaf8e235e97cba8f0e8e9b933987c.tar.gz
Qt-d852e6164a4aaf8e235e97cba8f0e8e9b933987c.tar.bz2
Properly resolve and use glMapBuffer / glUnmapBuffer on GLES2.
Even though we're able to resolve the function pointers, the spec says we have to check for the GL_OES_mapbuffer extension before we use them. Fixes a crash on a platform that doesn't advertise the extension but still resolves the function pointers. Reviewed-by: Kim
Diffstat (limited to 'src/opengl/qglextensions_p.h')
-rw-r--r--src/opengl/qglextensions_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/opengl/qglextensions_p.h b/src/opengl/qglextensions_p.h
index 98433c3..f85c89b 100644
--- a/src/opengl/qglextensions_p.h
+++ b/src/opengl/qglextensions_p.h
@@ -332,6 +332,8 @@ struct QGLExtensionFuncs
qt_glMapBufferARB = 0;
qt_glUnmapBufferARB = 0;
+ qt_bufferFuncsResolved = false;
+
qt_glProgramParameteriEXT = 0;
qt_glFramebufferTextureEXT = 0;
qt_glFramebufferTextureLayerEXT = 0;
@@ -457,6 +459,8 @@ struct QGLExtensionFuncs
_glMapBufferARB qt_glMapBufferARB;
_glUnmapBufferARB qt_glUnmapBufferARB;
+ bool qt_bufferFuncsResolved;
+
// Geometry shaders...
_glProgramParameteriEXT qt_glProgramParameteriEXT;
_glFramebufferTextureEXT qt_glFramebufferTextureEXT;