summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-02-28 17:03:57 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-04 15:59:05 +0100
commit4b2f35d04ca3c2e037b4d0edd8b2350051cc572c (patch)
treeb6cf33e9cba3e55b11be748fa37fd44b09021b54 /src/plugins
parentfe2ce05d23a52d27e50270d22eb9fff9ab091dd4 (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/plugins')
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp7
-rw-r--r--src/plugins/platforms/windows/qwindowsnativeinterface.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp2
3 files changed, 7 insertions, 6 deletions
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 2a7a275060..64a842d492 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -234,7 +234,8 @@ bool QWindowsIntegration::hasCapability(QPlatformIntegration::Capability cap) co
return true;
case ThreadedOpenGL:
#if defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC)
- return QOpenGLFunctions::isES() ? QWindowsEGLContext::hasThreadedOpenGLCapability() : true;
+ return QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL
+ ? QWindowsEGLContext::hasThreadedOpenGLCapability() : true;
# else
return true;
# endif // QT_OPENGL_ES_2
@@ -298,7 +299,7 @@ QPlatformOpenGLContext
{
qCDebug(lcQpaGl) << __FUNCTION__ << context->format();
#if defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC)
- if (QOpenGLFunctions::isES()){
+ if (QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL) {
if (d->m_staticEGLContext.isNull()) {
QWindowsEGLStaticContext *staticContext = QWindowsEGLStaticContext::create();
if (!staticContext)
@@ -309,7 +310,7 @@ QPlatformOpenGLContext
}
#endif
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (QOpenGLContext::openGLModuleType() == QOpenGLContext::DesktopGL) {
if (d->m_staticOpenGLContext.isNull())
d->m_staticOpenGLContext =
QSharedPointer<QOpenGLStaticContext>(QOpenGLStaticContext::create());
diff --git a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
index f6d01d7ef7..7e15be1d19 100644
--- a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
+++ b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
@@ -125,7 +125,7 @@ void *QWindowsNativeInterface::nativeResourceForContext(const QByteArray &resour
return 0;
}
#if defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC)
- if (QOpenGLFunctions::isES()) {
+ if (QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL) {
QWindowsEGLContext *windowsEglContext = static_cast<QWindowsEGLContext *>(context->handle());
if (resource == QByteArrayLiteral("eglDisplay"))
return windowsEglContext->eglDisplay();
@@ -136,7 +136,7 @@ void *QWindowsNativeInterface::nativeResourceForContext(const QByteArray &resour
}
#endif // QT_OPENGL_ES_2 || QT_OPENGL_DYNAMIC
#if !defined(QT_OPENGL_ES_2)
- if (!QOpenGLFunctions::isES()) {
+ if (QOpenGLContext::openGLModuleType() == QOpenGLContext::DesktopGL) {
QWindowsGLContext *windowsContext = static_cast<QWindowsGLContext *>(context->handle());
if (resource == QByteArrayLiteral("renderingContext"))
return windowsContext->renderingContext();
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index d77f587b92..3cf9481c17 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -880,7 +880,7 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const QWindowsWindowData &data)
if (aWindow->surfaceType() == QWindow::OpenGLSurface) {
setFlag(OpenGLSurface);
#if defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC)
- if (QOpenGLFunctions::isES())
+ if (QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL)
setFlag(OpenGL_ES2);
#endif
}