summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_p.h
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond@trolltech.com>2009-09-08 12:32:30 (GMT)
committerTrond Kjernåsen <trond@trolltech.com>2009-09-08 12:36:18 (GMT)
commit512a265f760c9207b94d7ba61cef9316b23cf4e8 (patch)
tree292049ef55db8f80fc785e79ac8d2390b812518e /src/opengl/qgl_p.h
parentb8e6f86ed8b27504f22da2167cb6aa9ecf829a71 (diff)
downloadQt-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 'src/opengl/qgl_p.h')
-rw-r--r--src/opengl/qgl_p.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index d4b7597..f8158a0 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -519,15 +519,7 @@ extern QPaintEngine* qt_qgl_paint_engine();
extern EGLDisplay qt_qgl_egl_display();
#endif
-inline bool qt_gl_preferGL2Engine()
-{
-#if defined(QT_OPENGL_ES_2)
- return true;
-#else
- return (QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0)
- && qgetenv("QT_GL_USE_OPENGL1ENGINE").isEmpty();
-#endif
-}
+bool qt_gl_preferGL2Engine();
inline GLenum qt_gl_preferredTextureFormat()
{