diff options
author | Trond Kjernåsen <trond@trolltech.com> | 2009-09-08 12:32:30 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond@trolltech.com> | 2009-09-08 12:36:18 (GMT) |
commit | 512a265f760c9207b94d7ba61cef9316b23cf4e8 (patch) | |
tree | 292049ef55db8f80fc785e79ac8d2390b812518e /demos/composition | |
parent | b8e6f86ed8b27504f22da2167cb6aa9ecf829a71 (diff) | |
download | Qt-512a265f760c9207b94d7ba61cef9316b23cf4e8.zip Qt-512a265f760c9207b94d7ba61cef9316b23cf4e8.tar.gz Qt-512a265f760c9207b94d7ba61cef9316b23cf4e8.tar.bz2 |
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')
-rw-r--r-- | demos/composition/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/demos/composition/main.cpp b/demos/composition/main.cpp index 3a959a9..fe142ad 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); |