diff options
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r-- | src/opengl/qgl.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 8aef8b4..5e00b11 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4735,16 +4735,19 @@ Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_gl_2_engine) Q_GLOBAL_STATIC(QOpenGLPaintEngine, qt_gl_engine) #endif -#ifdef Q_WS_QWS Q_OPENGL_EXPORT QPaintEngine* qt_qgl_paint_engine() { -#if !defined(QT_OPENGL_ES_2) +#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL) return qt_gl_engine(); +#elif defined(QT_OPENGL_ES_2) + return qt_gl_2_engine(); #else - return 0; // XXX + if (qt_gl_preferGL2Engine()) + return qt_gl_2_engine(); + else + return qt_gl_engine(); #endif } -#endif /*! \internal @@ -4754,16 +4757,7 @@ Q_OPENGL_EXPORT QPaintEngine* qt_qgl_paint_engine() */ QPaintEngine *QGLWidget::paintEngine() const { -#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL) - return qt_gl_engine(); -#elif defined(QT_OPENGL_ES_2) - return qt_gl_2_engine(); -#else - if (qt_gl_preferGL2Engine()) - return qt_gl_2_engine(); - else - return qt_gl_engine(); -#endif + return qt_qgl_paint_engine(); } #ifdef QT3_SUPPORT |