summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorcon <qtc-committer@nokia.com>2011-03-31 15:53:10 (GMT)
committercon <qtc-committer@nokia.com>2011-04-05 09:01:50 (GMT)
commitf3d82a8903b14bb35b0b5f0eb69168b2ca59c31b (patch)
tree9cdfabebeb91d059ae61c1a02558f1a7d9c6c9a3 /src/opengl
parent25054c7a20a6ebd15603ac1060e09ee244afa054 (diff)
downloadQt-f3d82a8903b14bb35b0b5f0eb69168b2ca59c31b.zip
Qt-f3d82a8903b14bb35b0b5f0eb69168b2ca59c31b.tar.gz
Qt-f3d82a8903b14bb35b0b5f0eb69168b2ca59c31b.tar.bz2
Compile fixes for GL ES and Mac
For QPA the unix tests are used to determine the availability of OpenGL ES, so they need to compile even on Mac. Similarly the includes in the OpenGL module have to be adapted on Mac. Acked-by: Jørgen Lind
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/opengl.pro2
-rw-r--r--src/opengl/qgl.h32
2 files changed, 21 insertions, 13 deletions
diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
index b512146..0d65b25 100644
--- a/src/opengl/opengl.pro
+++ b/src/opengl/opengl.pro
@@ -120,7 +120,7 @@ x11 {
LIBS_PRIVATE += $$QMAKE_LIBS_DYNLOAD
}
-mac {
+mac:!qpa {
OBJECTIVE_SOURCES += qgl_mac.mm \
qglpixelbuffer_mac.mm
LIBS_PRIVATE += -framework AppKit -framework Carbon
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index ff73d88..c57995d 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -61,21 +61,29 @@ QT_BEGIN_HEADER
#if defined(Q_WS_MAC)
# include <OpenGL/gl.h>
#elif defined(QT_OPENGL_ES_1)
-# include <GLES/gl.h>
-#ifndef GL_DOUBLE
-# define GL_DOUBLE GL_FLOAT
-#endif
-#ifndef GLdouble
+# if defined(Q_OS_MAC)
+# include <OpenGLES/ES1/gl.h>
+# else
+# include <GLES/gl.h>
+# endif
+# ifndef GL_DOUBLE
+# define GL_DOUBLE GL_FLOAT
+# endif
+# ifndef GLdouble
typedef GLfloat GLdouble;
-#endif
+# endif
#elif defined(QT_OPENGL_ES_2)
-# include <GLES2/gl2.h>
-#ifndef GL_DOUBLE
-# define GL_DOUBLE GL_FLOAT
-#endif
-#ifndef GLdouble
+# if defined(Q_OS_MAC)
+# include <OpenGLES/ES2/gl.h>
+# else
+# include <GLES2/gl2.h>
+# endif
+# ifndef GL_DOUBLE
+# define GL_DOUBLE GL_FLOAT
+# endif
+# ifndef GLdouble
typedef GLfloat GLdouble;
-#endif
+# endif
#else
# include <GL/gl.h>
#endif