From 47546dd3cae4cb6f1ca87621fb3752524f9d050d Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 4 Nov 2009 10:06:57 +0100 Subject: Compile on Mac OS X On Mac, there are compat overloads to e.g. setInternalTextureFormat() so we need to specify which function to call to avoid ambiguity. Reviewed-by: Samuel --- src/opengl/qglpixmapfilter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp index 8768fbc..0eaab28 100644 --- a/src/opengl/qglpixmapfilter.cpp +++ b/src/opengl/qglpixmapfilter.cpp @@ -518,7 +518,7 @@ bool QGLPixmapBlurFilter::processGL(QPainter *painter, const QPointF &pos, const m_singlePass = false; QGLFramebufferObjectFormat format; - format.setInternalTextureFormat(GL_RGBA); + format.setInternalTextureFormat(GLenum(GL_RGBA)); QGLFramebufferObject *fbo = qgl_fbo_pool()->acquire(targetRect.size() / 2, format, true); if (!fbo) -- cgit v0.12 From 26ded29b31c71ff43036798015cb1c77aae427e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Wed, 4 Nov 2009 12:22:18 +0100 Subject: Fixed compilation and linking of EGL on Windows CE. Moved duplicated and broken code for setting up the include and library paths into the egl.prf feature file, which egl.pri and opengl.pro now includes using the qmake feature system. Task-number: QTBUG-5148 Reviewed-by: Tom Cooksey --- mkspecs/common/wince/qmake.conf | 1 + mkspecs/features/egl.prf | 32 +++++++++++++++++++++++++++++--- src/gui/egl/egl.pri | 10 ++-------- src/opengl/opengl.pro | 10 ++-------- 4 files changed, 34 insertions(+), 19 deletions(-) diff --git a/mkspecs/common/wince/qmake.conf b/mkspecs/common/wince/qmake.conf index d87be02..ff99f1b 100644 --- a/mkspecs/common/wince/qmake.conf +++ b/mkspecs/common/wince/qmake.conf @@ -64,6 +64,7 @@ QMAKE_LIBS_NETWORK = ws2.lib QMAKE_LIBS_OPENGL = QMAKE_LIBS_COMPAT = +QMAKE_LIBS_EGL = libEGL.lib QMAKE_LIBS_OPENGL_ES1 = libGLES_CM.lib QMAKE_LIBS_OPENGL_ES1CL = libGLES_CL.lib QMAKE_LIBS_OPENGL_ES2 = libGLESv2.lib diff --git a/mkspecs/features/egl.prf b/mkspecs/features/egl.prf index 22002c3..00f70d3 100644 --- a/mkspecs/features/egl.prf +++ b/mkspecs/features/egl.prf @@ -1,3 +1,29 @@ -!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL -!isEmpty(QMAKE_LIBDIR_EGL): LIBS += -L$$QMAKE_LIBDIR_EGL -!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL +# On UNIX, we can use config tests to figure out if egl.h is in +# EGL/egl.h or GLES/egl.h. Sadly, there are no config tests on WinCE +# so we have to assume that for GLES 1.1 (CL), the EGL header is in +# GLES/egl.h. We also assume there is no separate libEGL.lib library, +# so we use the GL library instead. + +wince*:contains(QT_CONFIG, opengles1) { + INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES1 + LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES1 + for(p, QMAKE_LIBDIR_OPENGL_ES1) { + exists($$p):LIBS_PRIVATE += -L$$p + } + DEFINES += QT_GLES_EGL +} else:wince*:contains(QT_CONFIG, opengles1cl) { + INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES1CL + LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES1CL + LIBS += $$QMAKE_LFLAGS_EGL + for(p, QMAKE_LIBDIR_OPENGL_ES1CL) { + exists($$p):LIBS_PRIVATE += -L$$p + } + DEFINES += QT_GLES_EGL +} else { + INCLUDEPATH += $$QMAKE_INCDIR_EGL + LIBS_PRIVATE += $$QMAKE_LIBS_EGL + LIBS += $$QMAKE_LFLAGS_EGL + for(p, QMAKE_LIBDIR_EGL) { + exists($$p):LIBS_PRIVATE += -L$$p + } +} diff --git a/src/gui/egl/egl.pri b/src/gui/egl/egl.pri index 627d511..669d311 100644 --- a/src/gui/egl/egl.pri +++ b/src/gui/egl/egl.pri @@ -1,3 +1,5 @@ +CONFIG += egl + HEADERS += \ egl/qegl_p.h \ egl/qeglproperties_p.h @@ -19,11 +21,3 @@ unix { } } } - -for(p, QMAKE_LIBDIR_EGL) { - exists($$p):LIBS_PRIVATE += -L$$p -} - -!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL -!isEmpty(QMAKE_LIBS_EGL): LIBS_PRIVATE += $$QMAKE_LIBS_EGL -!isEmpty(QMAKE_LFLAGS_EGL): LIBS += $$QMAKE_LFLAGS_EGL diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index 7d6052b..deaf3bd 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -15,14 +15,7 @@ contains(QT_CONFIG, opengl):CONFIG += opengl contains(QT_CONFIG, opengles1):CONFIG += opengles1 contains(QT_CONFIG, opengles1cl):CONFIG += opengles1cl contains(QT_CONFIG, opengles2):CONFIG += opengles2 - -contains(QT_CONFIG, opengles.*) { - for(p, QMAKE_LIBDIR_EGL) { - exists($$p):LIBS_PRIVATE += -L$$p - } - !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL - !isEmpty(QMAKE_LIBS_EGL): LIBS_PRIVATE += $$QMAKE_LIBS_EGL -} +contains(QT_CONFIG, egl):CONFIG += egl HEADERS += qgl.h \ qgl_p.h \ @@ -163,3 +156,4 @@ contains(QT_CONFIG,opengles1) { LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL LIBS += $$QMAKE_LFLAGS_OPENGL } + -- cgit v0.12 From 5b6815ba1d6d82687b8244172482bb089210c8d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Wed, 4 Nov 2009 13:11:15 +0100 Subject: Fixed hardcoded GL library names on WinCE. Task-number: QTBUG-5148 Reviewed-by: Tom Cooksey --- examples/opengl/hellogl_es/hellogl_es.pro | 9 --------- examples/opengl/hellogl_es2/hellogl_es2.pro | 6 ------ mkspecs/features/win32/opengl.prf | 12 ++++++++++-- src/opengl/opengl.pro | 17 +---------------- 4 files changed, 11 insertions(+), 33 deletions(-) diff --git a/examples/opengl/hellogl_es/hellogl_es.pro b/examples/opengl/hellogl_es/hellogl_es.pro index 3168743..80ef7df 100644 --- a/examples/opengl/hellogl_es/hellogl_es.pro +++ b/examples/opengl/hellogl_es/hellogl_es.pro @@ -20,15 +20,6 @@ HEADERS += bubble.h RESOURCES += texture.qrc QT += opengl -wince*:{ - contains(QT_CONFIG,opengles1) { - QMAKE_LIBS += "libGLES_CM.lib" - } - contains(QT_CONFIG,opengles1cl) { - QMAKE_LIBS += "libGLES_CL.lib" - } -} - # install target.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl_es sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellogl_es.pro diff --git a/examples/opengl/hellogl_es2/hellogl_es2.pro b/examples/opengl/hellogl_es2/hellogl_es2.pro index d5ad4b8..92b4224 100644 --- a/examples/opengl/hellogl_es2/hellogl_es2.pro +++ b/examples/opengl/hellogl_es2/hellogl_es2.pro @@ -25,9 +25,3 @@ target.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl_es2 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellogl_es2.pro sources.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl_es2 INSTALLS += target sources - - -wince*: { - QMAKE_LIBS += "libGLESv2.lib" - -} \ No newline at end of file diff --git a/mkspecs/features/win32/opengl.prf b/mkspecs/features/win32/opengl.prf index 30af2a3..3414781 100644 --- a/mkspecs/features/win32/opengl.prf +++ b/mkspecs/features/win32/opengl.prf @@ -1,3 +1,11 @@ -QMAKE_LIBS += $$QMAKE_LIBS_OPENGL -QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL +# WinCE does not have a platform directory for .prf files, and the +# win32 directory is searched for .prfs by qmake on WinCE. Ideally +# there should be a features/wince/opengl.prf which contains the wince +# block below. +wince* { + include(../unix/opengl.prf) +} else { + QMAKE_LIBS += $$QMAKE_LIBS_OPENGL + QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL +} diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index deaf3bd..b2474ed 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -54,7 +54,7 @@ SOURCES += qgl.cpp \ gl2paintengineex/qpaintengineex_opengl2_p.h \ gl2paintengineex/qglengineshadersource_p.h \ gl2paintengineex/qglcustomshaderstage_p.h \ - gl2paintengineex/qtriangulatingstroker_p.h + gl2paintengineex/qtriangulatingstroker_p.h SOURCES += qglshaderprogram.cpp \ qglpixmapfilter.cpp \ @@ -142,18 +142,3 @@ embedded { } INCLUDEPATH += ../3rdparty/harfbuzz/src - -contains(QT_CONFIG,opengles1) { - LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES1 - LIBS += $$QMAKE_LFLAGS_OPENGL_ES1 -} else:contains(QT_CONFIG,opengles1cl) { - LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES1CL - LIBS += $$QMAKE_LFLAGS_OPENGL_ES1CL -} else:contains(QT_CONFIG,opengles2) { - LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES2 - LIBS += $$QMAKE_LFLAGS_OPENGL_ES2 -} else { - LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL - LIBS += $$QMAKE_LFLAGS_OPENGL -} - -- cgit v0.12