summaryrefslogtreecommitdiffstats
path: root/demos/composition/main.cpp
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond@trolltech.com>2009-09-08 14:32:30 +0200
committerTrond Kjernåsen <trond@trolltech.com>2009-09-08 14:36:18 +0200
commit512a265f760c9207b94d7ba61cef9316b23cf4e8 (patch)
tree292049ef55db8f80fc785e79ac8d2390b812518e /demos/composition/main.cpp
parentb8e6f86ed8b27504f22da2167cb6aa9ecf829a71 (diff)
Added a public function to enforce usage og the old GL engine.
Some applications that uses a mix of OpenGL and QPainter code may not work correctly with the new GL 2 engine (e.g. the composition demo). The same is most likely also true for user apps, therefore we need a way to enforce the usage of the old GL 1 engine for the sake of compatibility. Task-number: 260872 Reviewed-by: Samuel
Diffstat (limited to 'demos/composition/main.cpp')
-rw-r--r--demos/composition/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/demos/composition/main.cpp b/demos/composition/main.cpp
index 3a959a9008..fe142ad8f7 100644
--- a/demos/composition/main.cpp
+++ b/demos/composition/main.cpp
@@ -42,11 +42,17 @@
#include "composition.h"
#include <QApplication>
+#ifdef QT_OPENGL_SUPPORT
+#include <QtOpenGL>
+#endif
int main(int argc, char **argv)
{
// Q_INIT_RESOURCE(deform);
+#ifdef QT_OPENGL_SUPPORT
+ QGL::setPreferredPaintEngine(QPaintEngine::OpenGL);
+#endif
QApplication app(argc, argv);
CompositionWidget compWidget(0);