From 6f8bc4de406be856eeba9e62700888941ccfdcc1 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 2 Mar 2013 22:23:30 -0800 Subject: 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 --- src/gui/opengl/qopenglfunctions_2_0.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui/opengl/qopenglfunctions_2_0.h') diff --git a/src/gui/opengl/qopenglfunctions_2_0.h b/src/gui/opengl/qopenglfunctions_2_0.h index 915d35e963..afc5eabb38 100644 --- a/src/gui/opengl/qopenglfunctions_2_0.h +++ b/src/gui/opengl/qopenglfunctions_2_0.h @@ -51,7 +51,9 @@ #ifndef QOPENGLVERSIONFUNCTIONS_2_0_H #define QOPENGLVERSIONFUNCTIONS_2_0_H -#ifndef QT_NO_OPENGL +#include + +#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2) #include #include @@ -3608,6 +3610,6 @@ inline void QOpenGLFunctions_2_0::glVertexAttrib1d(GLuint index, GLdouble x) QT_END_NAMESPACE -#endif // QT_NO_OPENGL +#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2 #endif -- cgit v1.2.3