diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/opengl/qgraphicssystem_gl.cpp | 1 | ||||
-rw-r--r-- | src/opengl/qpixmapdata_gl.cpp | 3 | ||||
-rw-r--r-- | src/opengl/qwindowsurface_gl.cpp | 12 |
3 files changed, 15 insertions, 1 deletions
diff --git a/src/opengl/qgraphicssystem_gl.cpp b/src/opengl/qgraphicssystem_gl.cpp index ce8ad7a..a75f3a5 100644 --- a/src/opengl/qgraphicssystem_gl.cpp +++ b/src/opengl/qgraphicssystem_gl.cpp @@ -44,6 +44,7 @@ #include "private/qpixmap_raster_p.h" #include "private/qpixmapdata_gl_p.h" #include "private/qwindowsurface_gl_p.h" +#include "private/qgl_p.h" #include <private/qwindowsurface_raster_p.h> QT_BEGIN_NAMESPACE diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index 48feb82..e641d2c 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -398,7 +398,8 @@ static TextureBuffer createTextureBuffer(const QSize &size, QGL2PaintEngineEx *e bool QGLPixmapData::useFramebufferObjects() { return QGLFramebufferObject::hasOpenGLFramebufferObjects() - && QGLFramebufferObject::hasOpenGLFramebufferBlit(); + && QGLFramebufferObject::hasOpenGLFramebufferBlit() + && qt_gl_preferGL2Engine(); } QPaintEngine* QGLPixmapData::paintEngine() const diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 01974a2..cdfaa3c 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -72,6 +72,10 @@ #include <private/qpaintengineex_opengl2_p.h> +#ifndef QT_OPENGL_ES_2 +#include <private/qpaintengine_opengl_p.h> +#endif + #ifndef GLX_ARB_multisample #define GLX_SAMPLE_BUFFERS_ARB 100000 #define GLX_SAMPLES_ARB 100001 @@ -315,9 +319,17 @@ void QGLWindowSurface::hijackWindow(QWidget *widget) Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_gl_window_surface_2_engine) +#if !defined (QT_OPENGL_ES_2) +Q_GLOBAL_STATIC(QOpenGLPaintEngine, qt_gl_window_surface_engine) +#endif + /*! \reimp */ QPaintEngine *QGLWindowSurface::paintEngine() const { +#if !defined(QT_OPENGL_ES_2) + if (!qt_gl_preferGL2Engine()) + return qt_gl_window_surface_engine(); +#endif return qt_gl_window_surface_2_engine(); } |