diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2012-10-17 15:18:28 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-18 15:13:11 +0200 |
commit | 23c19acc59e791a92bb2a493236ec210cf33e56d (patch) | |
tree | 496a3b88feba5346fb4106f0ba1e04f886ec786e /src/plugins/platforms/windows/qwindowsglcontext.cpp | |
parent | 5c57d1eacb04b4fa6a5dd8b1299926e6c02ac602 (diff) |
Windows QPA plugin: Parse arguments from list passed to factory.
Using dynamic properties on the native interface is deprecated.
Change-Id: Ia3411780dad15af61d4805c0d9fabf00dba92301
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsglcontext.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsglcontext.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index a760ea06e9..b50a858f96 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -42,6 +42,7 @@ #include "qwindowsglcontext.h" #include "qwindowscontext.h" #include "qwindowswindow.h" +#include "qwindowsintegration.h" #include <QtCore/QDebug> #include <QtCore/QSysInfo> @@ -855,16 +856,6 @@ QDebug operator<<(QDebug d, const QOpenGLStaticContext &s) return d; } -// Use ARB unless explicitly turned off on command line. -static inline bool useARB() -{ - const QVariant glExtension = qApp->platformNativeInterface()->property("gl"); - if (glExtension.type() == QVariant::String - && !glExtension.toString().compare(QStringLiteral("gdi"), Qt::CaseInsensitive)) - return false; - return true; -} - /*! \class QWindowsGLContext \brief Open GL context. @@ -914,12 +905,13 @@ QWindowsGLContext::QWindowsGLContext(const QOpenGLStaticContextPtr &staticContex if (QWindowsContext::verboseGL > 1) describeFormats(hdc); - // Preferably use direct rendering and ARB extensions (unless pixmap) + // Preferably use direct rendering and ARB extensions (unless pixmap + // or explicitly turned off on command line). const QWindowsOpenGLAdditionalFormat requestedAdditional(QWindowsGLDirectRendering); tryExtensions = m_staticContext->hasExtensions() && !testFlag(requestedAdditional.formatFlags, QWindowsGLRenderToPixmap) - && useARB(); + && !(QWindowsIntegration::instance()->options() & QWindowsIntegration::DisableArb); QWindowsOpenGLAdditionalFormat obtainedAdditional; if (tryExtensions) { m_pixelFormat = |