summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglpixelbuffer.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-05-14 08:51:46 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-05-14 08:51:46 (GMT)
commit521c5cc3910bffe566e0fb653041f159ecb5b6d5 (patch)
tree70b703fa82b7e5f2e07105fb37ff5dc9353e6598 /src/opengl/qglpixelbuffer.cpp
parentf15352c51625688ec445c73125a2e25327377d49 (diff)
downloadQt-521c5cc3910bffe566e0fb653041f159ecb5b6d5.zip
Qt-521c5cc3910bffe566e0fb653041f159ecb5b6d5.tar.gz
Qt-521c5cc3910bffe566e0fb653041f159ecb5b6d5.tar.bz2
Make QtOpenGL compile on OpenGL ES 1.1 again
Diffstat (limited to 'src/opengl/qglpixelbuffer.cpp')
-rw-r--r--src/opengl/qglpixelbuffer.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp
index 00b58d3..ce7e9bd 100644
--- a/src/opengl/qglpixelbuffer.cpp
+++ b/src/opengl/qglpixelbuffer.cpp
@@ -365,7 +365,9 @@ bool QGLPixelBuffer::isValid() const
return !d->invalid;
}
+#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_buffer_2_engine)
+#endif
#ifndef QT_OPENGL_ES_2
Q_GLOBAL_STATIC(QOpenGLPaintEngine, qt_buffer_engine)
@@ -374,13 +376,15 @@ Q_GLOBAL_STATIC(QOpenGLPaintEngine, qt_buffer_engine)
/*! \reimp */
QPaintEngine *QGLPixelBuffer::paintEngine() const
{
-#if !defined(QT_OPENGL_ES_2)
+#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
+ return qt_buffer_engine();
+#elif defined(QT_OPENGL_ES_2)
+ return qt_buffer_2_engine();
+#else
if (d_ptr->qctx->d_func()->internal_context || qt_gl_preferGL2Engine())
return qt_buffer_2_engine();
else
return qt_buffer_engine();
-#else
- return 0;
#endif
}