diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-09-10 13:34:05 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-09-11 10:02:30 (GMT) |
commit | e59d4e9f0b147409a8a2732ee3f29f8e7768349a (patch) | |
tree | 8ab51c9b09fca532fc5e951af7dd41373e950ddd /src/plugins | |
parent | 04fc98f2ed323c71a8671542f4f37faa988c434f (diff) | |
download | Qt-e59d4e9f0b147409a8a2732ee3f29f8e7768349a.zip Qt-e59d4e9f0b147409a8a2732ee3f29f8e7768349a.tar.gz Qt-e59d4e9f0b147409a8a2732ee3f29f8e7768349a.tar.bz2 |
Enabled use of graphics system with old GL engine for testing.
Reviewed-by: Trond
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/graphicssystems/opengl/main.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/graphicssystems/opengl/main.cpp b/src/plugins/graphicssystems/opengl/main.cpp index 0562132..c28b09a 100644 --- a/src/plugins/graphicssystems/opengl/main.cpp +++ b/src/plugins/graphicssystems/opengl/main.cpp @@ -41,6 +41,7 @@ #include <private/qgraphicssystemplugin_p.h> #include <private/qgraphicssystem_gl_p.h> +#include <qgl.h> QT_BEGIN_NAMESPACE @@ -53,11 +54,18 @@ public: QStringList QGLGraphicsSystemPlugin::keys() const { - return QStringList(QLatin1String("OpenGL")); + QStringList list; + list << QLatin1String("OpenGL") << QLatin1String("OpenGL1"); + return list; } QGraphicsSystem* QGLGraphicsSystemPlugin::create(const QString& system) { + if (system.toLower() == QLatin1String("opengl1")) { + QGL::setPreferredPaintEngine(QPaintEngine::OpenGL); + return new QGLGraphicsSystem; + } + if (system.toLower() == QLatin1String("opengl")) return new QGLGraphicsSystem; |