summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglfunctions_1_1.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-03-02 22:23:30 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-05 02:43:00 +0100
commit6f8bc4de406be856eeba9e62700888941ccfdcc1 (patch)
treebffe36daadc43f4b8fa76e70add2ad7b93973bea /src/gui/opengl/qopenglfunctions_1_1.h
parent5107cacaeed4b07ca46742206db0f871e284d0ae (diff)
Make the new OpenGL function headers compile on their own
You can't use #ifndef QT_NO_OPENGL before including whatever is supposed to define that. That's qconfig.h, included by qglobal.h. Also, make sure that the desktop OpenGL code isn't activated when compiling in OpenGL ES 2 mode -- QOpenGLFunctions_1_0_CoreBackend and other classes aren't defined. Change-Id: I127edf56d42257580579789d0566b7e11c21133b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/gui/opengl/qopenglfunctions_1_1.h')
-rw-r--r--src/gui/opengl/qopenglfunctions_1_1.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/opengl/qopenglfunctions_1_1.h b/src/gui/opengl/qopenglfunctions_1_1.h
index 4eb065e1ee..fbe714c9ad 100644
--- a/src/gui/opengl/qopenglfunctions_1_1.h
+++ b/src/gui/opengl/qopenglfunctions_1_1.h
@@ -51,7 +51,9 @@
#ifndef QOPENGLVERSIONFUNCTIONS_1_1_H
#define QOPENGLVERSIONFUNCTIONS_1_1_H
-#ifndef QT_NO_OPENGL
+#include <QtCore/qglobal.h>
+
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
#include <QtGui/QOpenGLVersionFunctions>
#include <QtGui/qopenglcontext.h>
@@ -2113,6 +2115,6 @@ inline void QOpenGLFunctions_1_1::glArrayElement(GLint i)
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL
+#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
#endif