summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-11-26 19:26:58 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-11-26 21:02:26 (GMT)
commit20da7afb4c575001b7373554ebf7e7fb434a2942 (patch)
tree19167495e51e3e93a5fa19dffbafcfc4806a5edf /src/opengl
parentdc23fd546163edb7ff4395f44217b5cb2600004a (diff)
downloadQt-20da7afb4c575001b7373554ebf7e7fb434a2942.zip
Qt-20da7afb4c575001b7373554ebf7e7fb434a2942.tar.gz
Qt-20da7afb4c575001b7373554ebf7e7fb434a2942.tar.bz2
Fix warning about address of a function being constant.
In OpenGL ES 2, these functions are always expected to be present, so the address can never be zero. So only test for the function being found if we tried to find it dynamicaly.
Diffstat (limited to 'src/opengl')
-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 ed9753e..18f1203 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2095,7 +2095,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);
@@ -2108,7 +2110,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);