diff options
author | con <qtc-committer@nokia.com> | 2011-03-31 15:53:10 (GMT) |
---|---|---|
committer | con <qtc-committer@nokia.com> | 2011-04-05 09:01:50 (GMT) |
commit | f3d82a8903b14bb35b0b5f0eb69168b2ca59c31b (patch) | |
tree | 9cdfabebeb91d059ae61c1a02558f1a7d9c6c9a3 /src | |
parent | 25054c7a20a6ebd15603ac1060e09ee244afa054 (diff) | |
download | Qt-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')
-rw-r--r-- | src/opengl/opengl.pro | 2 | ||||
-rw-r--r-- | src/opengl/qgl.h | 32 | ||||
-rw-r--r-- | src/plugins/platforms/uikit/README | 4 |
3 files changed, 23 insertions, 15 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 diff --git a/src/plugins/platforms/uikit/README b/src/plugins/platforms/uikit/README index b2984fc..a101a3a 100644 --- a/src/plugins/platforms/uikit/README +++ b/src/plugins/platforms/uikit/README @@ -18,11 +18,11 @@ After configuring and building Qt you need to also build src/plugins/platforms/u Simulator: ---------- -configure -qpa -xplatform qws/macx-iphonesimulator-g++ -arch i386 -developer-build -no-accessibility -no-qt3support -no-multimedia -no-phonon -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -no-opengl -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations +configure -qpa -xplatform qws/macx-iphonesimulator-g++ -arch i386 -developer-build -opengl es1 -no-accessibility -no-qt3support -no-multimedia -no-phonon -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations Device: ------- -configure -qpa -xplatform qws/macx-iphonedevice-g++ -arch armv7 -developer-build -release -no-accessibility -no-qt3support -no-multimedia -no-phonon -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -no-opengl -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations +configure -qpa -xplatform qws/macx-iphonedevice-g++ -arch armv7 -developer-build -release -opengl es1 -no-accessibility -no-qt3support -no-multimedia -no-phonon -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations 2) XCode setup: - there are examples in the examples subdirectory of the platform plugin |