diff options
-rw-r--r-- | config.tests/unix/opengles1/opengles1.cpp | 6 | ||||
-rw-r--r-- | config.tests/unix/opengles1/opengles1.pro | 4 | ||||
-rw-r--r-- | config.tests/unix/opengles2/opengles2.cpp | 6 | ||||
-rw-r--r-- | config.tests/unix/opengles2/opengles2.pro | 4 | ||||
-rw-r--r-- | mkspecs/qws/macx-iphonedevice-g++/qmake.conf | 5 | ||||
-rw-r--r-- | mkspecs/qws/macx-iphonesimulator-g++/qmake.conf | 3 | ||||
-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 |
9 files changed, 48 insertions, 18 deletions
diff --git a/config.tests/unix/opengles1/opengles1.cpp b/config.tests/unix/opengles1/opengles1.cpp index caef9a9..ec16fc0 100644 --- a/config.tests/unix/opengles1/opengles1.cpp +++ b/config.tests/unix/opengles1/opengles1.cpp @@ -39,7 +39,11 @@ ** ****************************************************************************/ -#include <GLES/gl.h> +#ifdef BUILD_ON_MAC + #include <OpenGLES/ES1/gl.h> +#else + #include <GLES/gl.h> +#endif int main(int, char **) { diff --git a/config.tests/unix/opengles1/opengles1.pro b/config.tests/unix/opengles1/opengles1.pro index 1469aa9..9e60124 100644 --- a/config.tests/unix/opengles1/opengles1.pro +++ b/config.tests/unix/opengles1/opengles1.pro @@ -7,3 +7,7 @@ for(p, QMAKE_LIBDIR_OPENGL_ES1) { CONFIG -= qt LIBS += $$QMAKE_LIBS_OPENGL_ES1 +mac { + DEFINES += BUILD_ON_MAC + CONFIG -= app_bundle +} diff --git a/config.tests/unix/opengles2/opengles2.cpp b/config.tests/unix/opengles2/opengles2.cpp index caf02e6..39c6fa7 100644 --- a/config.tests/unix/opengles2/opengles2.cpp +++ b/config.tests/unix/opengles2/opengles2.cpp @@ -39,7 +39,11 @@ ** ****************************************************************************/ -#include <GLES2/gl2.h> +#ifdef BUILD_ON_MAC + #include <OpenGLES/ES2/gl.h> +#else + #include <GLES2/gl2.h> +#endif int main(int, char **) { diff --git a/config.tests/unix/opengles2/opengles2.pro b/config.tests/unix/opengles2/opengles2.pro index c383fd0..34d7737 100644 --- a/config.tests/unix/opengles2/opengles2.pro +++ b/config.tests/unix/opengles2/opengles2.pro @@ -7,3 +7,7 @@ for(p, QMAKE_LIBDIR_OPENGL_ES2) { CONFIG -= qt LIBS += $$QMAKE_LIBS_OPENGL_ES2 +mac { + DEFINES += BUILD_ON_MAC + CONFIG -= app_bundle +} diff --git a/mkspecs/qws/macx-iphonedevice-g++/qmake.conf b/mkspecs/qws/macx-iphonedevice-g++/qmake.conf index 36b9496..227d24e 100644 --- a/mkspecs/qws/macx-iphonedevice-g++/qmake.conf +++ b/mkspecs/qws/macx-iphonedevice-g++/qmake.conf @@ -16,12 +16,15 @@ DEFINES += QT_NO_AUDIO_BACKEND QT_NO_NETWORKPROXY QT_NO_FILESYSTEMWATCHER # You may need to change this to point to the iOS SDK you want to use. QMAKE_IOS_DEV_PATH = /Developer/Platforms/iPhoneOS.platform/Developer -QMAKE_IOS_SDK = $$QMAKE_IOS_DEV_PATH/SDKs/iPhoneOS4.2.sdk +QMAKE_IOS_SDK = $$QMAKE_IOS_DEV_PATH/SDKs/iPhoneOS4.3.sdk DEFINES += __IPHONE_OS_VERSION_MIN_REQUIRED=40200 #clear QMAKE_MACOSX_DEPLOYMENT_TARGET = +QMAKE_LIBS_OPENGL_ES1 += -framework OpenGLES +QMAKE_LIBS_OPENGL_ES2 += -framework OpenGLES + # TARGET_PLATFORM = ios QMAKE_CC = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 QMAKE_CXX = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 diff --git a/mkspecs/qws/macx-iphonesimulator-g++/qmake.conf b/mkspecs/qws/macx-iphonesimulator-g++/qmake.conf index dccab70..93c4786 100644 --- a/mkspecs/qws/macx-iphonesimulator-g++/qmake.conf +++ b/mkspecs/qws/macx-iphonesimulator-g++/qmake.conf @@ -21,6 +21,9 @@ DEFINES += __IPHONE_OS_VERSION_MIN_REQUIRED=40200 #clear QMAKE_MACOSX_DEPLOYMENT_TARGET = +QMAKE_LIBS_OPENGL_ES1 += -framework OpenGLES +QMAKE_LIBS_OPENGL_ES2 += -framework OpenGLES + # TARGET_PLATFORM = ios QMAKE_CC = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 QMAKE_CXX = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2 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 |