summaryrefslogtreecommitdiffstats
path: root/src/plugins/graphicssystems
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-04-23 13:24:19 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-04-26 06:26:01 (GMT)
commit372392153a2c1de69d9257753ba84f44cbbd9cf1 (patch)
tree162f49ffbc677af4fbc56c2ef9c83984ecf15c28 /src/plugins/graphicssystems
parent8669823d5a5c0f26ff3909ad9c83fa99a63a89f3 (diff)
downloadQt-372392153a2c1de69d9257753ba84f44cbbd9cf1.zip
Qt-372392153a2c1de69d9257753ba84f44cbbd9cf1.tar.gz
Qt-372392153a2c1de69d9257753ba84f44cbbd9cf1.tar.bz2
Enable QX11GLWindowSurface using "-graphicssystem x11gl" option
When the OpenGL graphics system is in X11GL mode, it will use the QX11GLWindowSurface for all widgets except QGraphicsViews with the FullViewportUpdate update mode set, where it will use the regular QGLWindowSurface, as this is probabbly faster. QX11GLWindowSurface differs from QGLWindowSurface because it allows accelerated scrolling and partial updates, while still being using opengl to do rendering. Task-number: QT-280 Task-number: QT-2625 Reviewed-By: Trond
Diffstat (limited to 'src/plugins/graphicssystems')
-rw-r--r--src/plugins/graphicssystems/opengl/main.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/plugins/graphicssystems/opengl/main.cpp b/src/plugins/graphicssystems/opengl/main.cpp
index abcfb7f..4c740ca 100644
--- a/src/plugins/graphicssystems/opengl/main.cpp
+++ b/src/plugins/graphicssystems/opengl/main.cpp
@@ -59,6 +59,9 @@ QStringList QGLGraphicsSystemPlugin::keys() const
#if !defined(QT_OPENGL_ES_1)
list << QLatin1String("OpenGL2");
#endif
+#if defined(Q_WS_X11) && !defined(QT_NO_EGL)
+ list << QLatin1String("X11GL");
+#endif
return list;
}
@@ -66,18 +69,23 @@ QGraphicsSystem* QGLGraphicsSystemPlugin::create(const QString& system)
{
if (system.toLower() == QLatin1String("opengl1")) {
QGL::setPreferredPaintEngine(QPaintEngine::OpenGL);
- return new QGLGraphicsSystem;
+ return new QGLGraphicsSystem(false);
}
#if !defined(QT_OPENGL_ES_1)
if (system.toLower() == QLatin1String("opengl2")) {
QGL::setPreferredPaintEngine(QPaintEngine::OpenGL2);
- return new QGLGraphicsSystem;
+ return new QGLGraphicsSystem(false);
}
#endif
+#if defined(Q_WS_X11) && !defined(QT_NO_EGL)
+ if (system.toLower() == QLatin1String("x11gl"))
+ return new QGLGraphicsSystem(true);
+#endif
+
if (system.toLower() == QLatin1String("opengl"))
- return new QGLGraphicsSystem;
+ return new QGLGraphicsSystem(false);
return 0;
}