diff options
Diffstat (limited to 'src/opengl/qglframebufferobject.cpp')
-rw-r--r-- | src/opengl/qglframebufferobject.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index aa5dfc5..87e0dda 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -43,11 +43,12 @@ #include <qdebug.h> #include <private/qgl_p.h> -#if 1 || defined(QT_OPENGL_ES_2) #include <private/qpaintengineex_opengl2_p.h> -#else + +#ifndef QT_OPENGL_ES_2 #include <private/qpaintengine_opengl_p.h> #endif + #include <qglframebufferobject.h> #include <qlibrary.h> #include <qimage.h> @@ -896,17 +897,20 @@ QImage QGLFramebufferObject::toImage() const return image; } -#if 1 || defined(QT_OPENGL_ES_2) -Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_buffer_paintengine) -#else -Q_GLOBAL_STATIC(QOpenGLPaintEngine, qt_buffer_paintengine) +Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_buffer_2_engine) + +#ifndef QT_OPENGL_ES_2 +Q_GLOBAL_STATIC(QOpenGLPaintEngine, qt_buffer_engine) #endif /*! \reimp */ QPaintEngine *QGLFramebufferObject::paintEngine() const { #if !defined(QT_OPENGL_ES_2) - return qt_buffer_paintengine(); + if (qt_gl_preferGL2Engine()) + return qt_buffer_2_engine(); + else + return qt_buffer_engine(); #else return 0; #endif |