diff options
Diffstat (limited to 'src/plugins')
-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; |