From a94e9c5022076a97e796a984527ed1935c0803d0 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Fri, 2 Oct 2009 08:37:48 +1000 Subject: Add "opengl2" as an option for creating an OpenGL graphics system Reviewed-by: trustme --- src/plugins/graphicssystems/opengl/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- cgit v0.12