diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-10-01 22:37:48 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-10-01 22:37:48 (GMT) |
commit | a94e9c5022076a97e796a984527ed1935c0803d0 (patch) | |
tree | d143fa5e27288e69f792f493958521dfdab55beb /src/plugins/graphicssystems/opengl | |
parent | b75057bf8943ff67d566132587c8db3941a9cf47 (diff) | |
download | Qt-a94e9c5022076a97e796a984527ed1935c0803d0.zip Qt-a94e9c5022076a97e796a984527ed1935c0803d0.tar.gz Qt-a94e9c5022076a97e796a984527ed1935c0803d0.tar.bz2 |
Add "opengl2" as an option for creating an OpenGL graphics system
Reviewed-by: trustme
Diffstat (limited to 'src/plugins/graphicssystems/opengl')
-rw-r--r-- | src/plugins/graphicssystems/opengl/main.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/graphicssystems/opengl/main.cpp b/src/plugins/graphicssystems/opengl/main.cpp index c28b09a..6216ada 100644 --- a/src/plugins/graphicssystems/opengl/main.cpp +++ b/src/plugins/graphicssystems/opengl/main.cpp @@ -56,6 +56,9 @@ QStringList QGLGraphicsSystemPlugin::keys() const { QStringList list; list << QLatin1String("OpenGL") << QLatin1String("OpenGL1"); +#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) + list << QLatin1String("OpenGL2"); +#endif return list; } @@ -66,6 +69,13 @@ QGraphicsSystem* QGLGraphicsSystemPlugin::create(const QString& system) return new QGLGraphicsSystem; } +#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) + if (system.toLower() == QLatin1String("opengl2")) { + QGL::setPreferredPaintEngine(QPaintEngine::OpenGL2); + return new QGLGraphicsSystem; + } +#endif + if (system.toLower() == QLatin1String("opengl")) return new QGLGraphicsSystem; |