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.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index dc7a333..8b31849 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2125,7 +2125,9 @@ void QGLContextPrivate::cleanup()
void QGLContextPrivate::setVertexAttribArrayEnabled(int arrayIndex, bool enabled)
{
Q_ASSERT(arrayIndex < QT_GL_VERTEX_ARRAY_TRACKED_COUNT);
+#ifdef glEnableVertexAttribArray
Q_ASSERT(glEnableVertexAttribArray);
+#endif
if (vertexAttributeArraysEnabledState[arrayIndex] && !enabled)
glDisableVertexAttribArray(arrayIndex);
@@ -2138,7 +2140,9 @@ void QGLContextPrivate::setVertexAttribArrayEnabled(int arrayIndex, bool enabled
void QGLContextPrivate::syncGlState()
{
+#ifdef glEnableVertexAttribArray
Q_ASSERT(glEnableVertexAttribArray);
+#endif
for (int i = 0; i < QT_GL_VERTEX_ARRAY_TRACKED_COUNT; ++i) {
if (vertexAttributeArraysEnabledState[i])
glEnableVertexAttribArray(i);