summaryrefslogtreecommitdiffstats
path: root/src/opengl/qwindowsurface_gl.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-06-15 08:47:51 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-06-15 10:02:32 (GMT)
commitca57370d923cbda2f14380382d887ad5e003a040 (patch)
tree13e2f239c8235a3cfc1b690432f28076c2b061b5 /src/opengl/qwindowsurface_gl.cpp
parentd5750bbf85a234692261df24e99a1c4f427bf287 (diff)
downloadQt-ca57370d923cbda2f14380382d887ad5e003a040.zip
Qt-ca57370d923cbda2f14380382d887ad5e003a040.tar.gz
Qt-ca57370d923cbda2f14380382d887ad5e003a040.tar.bz2
Re-enabled GL pixmap backend and window surface to work without GL2.
GL window surface and GL pixmap backend should work with old GL engine as well, though not supported to the same degree. Reviewed-by: Trond
Diffstat (limited to 'src/opengl/qwindowsurface_gl.cpp')
-rw-r--r--src/opengl/qwindowsurface_gl.cpp12
1 files changed, 12 insertions, 0 deletions
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();
}