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 /src/platformsupport | |
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 'src/platformsupport')
-rw-r--r-- | src/platformsupport/eglconvenience/qeglconvenience.cpp | 10 | ||||
-rw-r--r-- | src/platformsupport/eglconvenience/qeglplatformcontext.cpp | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/platformsupport/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp index a36d0b83d4..790467150f 100644 --- a/src/platformsupport/eglconvenience/qeglconvenience.cpp +++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include <QByteArray> -#include <QOpenGLFunctions> +#include <QOpenGLContext> #ifdef Q_OS_LINUX #include <sys/ioctl.h> @@ -245,9 +245,11 @@ EGLConfig QEglConfigChooser::chooseConfig() break; #ifdef EGL_VERSION_1_4 case QSurfaceFormat::DefaultRenderableType: - if (!QOpenGLFunctions::isES()) +#ifndef QT_NO_OPENGL + if (QOpenGLContext::openGLModuleType() == QOpenGLContext::DesktopGL) configureAttributes.append(EGL_OPENGL_BIT); else +#endif // QT_NO_OPENGL configureAttributes.append(EGL_OPENGL_ES2_BIT); break; case QSurfaceFormat::OpenGL: @@ -361,7 +363,9 @@ QSurfaceFormat q_glFormatFromConfig(EGLDisplay display, const EGLConfig config, && (renderableType & EGL_OPENGL_BIT)) format.setRenderableType(QSurfaceFormat::OpenGL); else if (referenceFormat.renderableType() == QSurfaceFormat::DefaultRenderableType - && !QOpenGLFunctions::isES() +#ifndef QT_NO_OPENGL + && QOpenGLContext::openGLModuleType() == QOpenGLContext::DesktopGL +#endif && (renderableType & EGL_OPENGL_BIT)) format.setRenderableType(QSurfaceFormat::OpenGL); #endif diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp index 3a34748fc7..630c77fba0 100644 --- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp +++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp @@ -42,7 +42,7 @@ #include "qeglplatformcontext_p.h" #include "qeglconvenience_p.h" #include <qpa/qplatformwindow.h> -#include <QtGui/QOpenGLFunctions> +#include <QOpenGLContext> QT_BEGIN_NAMESPACE @@ -71,9 +71,11 @@ static inline void bindApi(const QSurfaceFormat &format) break; #ifdef EGL_VERSION_1_4 case QSurfaceFormat::DefaultRenderableType: - if (!QOpenGLFunctions::isES()) +#ifndef QT_NO_OPENGL + if (QOpenGLContext::openGLModuleType() == QOpenGLContext::DesktopGL) eglBindAPI(EGL_OPENGL_API); else +#endif // QT_NO_OPENGL eglBindAPI(EGL_OPENGL_ES_API); break; case QSurfaceFormat::OpenGL: |