diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-02-28 17:03:57 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-04 15:59:05 +0100 |
commit | 4b2f35d04ca3c2e037b4d0edd8b2350051cc572c (patch) | |
tree | b6cf33e9cba3e55b11be748fa37fd44b09021b54 /tests | |
parent | fe2ce05d23a52d27e50270d22eb9fff9ab091dd4 (diff) |
Dynamic GL: remove exporting symbols
Remove the opengl proxy for now. Later it will either be moved into
a separate library or replaced by a QOpenGLFunctions-based approach.
This means that the -opengl dynamic configuration is not usable
for the time being. The rest of the enablers remain in place.
The convenience function QOpenGLFunctions::isES() is now moved to
QOpenGLContext and is changed to check the renderable type. This is
extremely useful since besides supporting dynamic GL it solves also
the problem of GL_ARB_ES2_compatibility (i.e. it triggers the real ES
path when creating an ES-compatible context with a desktop OpenGL
implementation).
Task-number: QTBUG-36483
Task-number: QTBUG-37172
Change-Id: I045be3fc16e9043e1528cf48e6bf0903da4fa7ca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/opengl/qgl/tst_qgl.cpp | 8 | ||||
-rw-r--r-- | tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp | 2 | ||||
-rw-r--r-- | tests/auto/opengl/qglthreads/tst_qglthreads.cpp | 2 | ||||
-rw-r--r-- | tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp | 5 |
4 files changed, 9 insertions, 8 deletions
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp index 57128e4a82..718b5263bf 100644 --- a/tests/auto/opengl/qgl/tst_qgl.cpp +++ b/tests/auto/opengl/qgl/tst_qgl.cpp @@ -752,7 +752,7 @@ void tst_QGL::openGLVersionCheck() #elif defined(QT_OPENGL_ES_2) QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0); #else - if (QOpenGLFunctions::isES()) + if (QOpenGLContext::currentContext()->isES()) QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0); else QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_1); @@ -1534,7 +1534,7 @@ void tst_QGL::fboFormat() #ifdef QT_OPENGL_ES_2 GL_RGBA; #else - QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8; + QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL ? GL_RGBA : GL_RGBA8; #endif QCOMPARE(int(format1.internalTextureFormat()), expectedFormat); @@ -1611,7 +1611,7 @@ void tst_QGL::fboFormat() #ifdef QT_OPENGL_ES_2 GL_RGBA #else - QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8 + QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL ? GL_RGBA : GL_RGBA8 #endif ); QVERIFY(!(format1c == format3c)); @@ -1624,7 +1624,7 @@ void tst_QGL::fboFormat() #ifdef QT_OPENGL_ES_2 GL_RGBA #else - QOpenGLFunctions::isES() ? GL_RGBA : GL_RGBA8 + QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL ? GL_RGBA : GL_RGBA8 #endif ); QVERIFY(!(format1c == format4c)); diff --git a/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp b/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp index fea3c7b643..cdd820cf5b 100644 --- a/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp +++ b/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp @@ -96,7 +96,7 @@ void tst_QGLFunctions::features() funcs.initializeGLFunctions(); // Validate the features against what we expect for this platform. - if (QOpenGLFunctions::isES()) { + if (QOpenGLContext::currentContext()->isES()) { #if !defined(QT_OPENGL_ES) || defined(QT_OPENGL_ES_2) QGLFunctions::OpenGLFeatures allFeatures = (QGLFunctions::Multitexture | diff --git a/tests/auto/opengl/qglthreads/tst_qglthreads.cpp b/tests/auto/opengl/qglthreads/tst_qglthreads.cpp index 765dc221dc..63c6cb658b 100644 --- a/tests/auto/opengl/qglthreads/tst_qglthreads.cpp +++ b/tests/auto/opengl/qglthreads/tst_qglthreads.cpp @@ -333,7 +333,7 @@ static inline float qrandom() { return (rand() % 100) / 100.f; } void renderAScene(int w, int h) { - if (QOpenGLFunctions::isES()) { + if (QOpenGLContext::currentContext()->isES()) { QGLFunctions funcs(QGLContext::currentContext()); Q_UNUSED(w); Q_UNUSED(h); diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp index 5f4284e79a..ba9652a170 100644 --- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp +++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp @@ -59,6 +59,7 @@ #include <QTextEdit> #ifndef QT_NO_OPENGL #include <QtOpenGL> +#include <QOpenGLContext> #endif #include <QStyleHints> @@ -2596,8 +2597,8 @@ void tst_QMdiArea::nativeSubWindows() const QString platformName = QGuiApplication::platformName(); if (platformName != QLatin1String("xcb") && platformName != QLatin1String("windows")) QSKIP(qPrintable(QString::fromLatin1("nativeSubWindows() does not work on this platform (%1).").arg(platformName))); -#ifdef Q_OS_WIN - if (QOpenGLFunctions::isES()) +#if defined(Q_OS_WIN) && !defined(QT_NO_OPENGL) + if (QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL) QSKIP("nativeSubWindows() does not work with ANGLE on Windows, QTBUG-28545."); #endif { // Add native widgets after show. |