summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-06-09 00:54:37 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-06-09 00:54:37 (GMT)
commit1bbe23c5814dfda4cc6154c49e5bbf7c6ead7eba (patch)
treeb329314e78cadd712b17edb38c3f0f5753d9acd5 /src/opengl/qgl.cpp
parenta359abb4ccf5a2dc3bd1fac9836231677b3dc14f (diff)
downloadQt-1bbe23c5814dfda4cc6154c49e5bbf7c6ead7eba.zip
Qt-1bbe23c5814dfda4cc6154c49e5bbf7c6ead7eba.tar.gz
Qt-1bbe23c5814dfda4cc6154c49e5bbf7c6ead7eba.tar.bz2
Make OpenGL/ES 1.1 work again for Qt/Embedded
Reviewed-by: trustme
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r--src/opengl/qgl.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 2e72851..37a9916 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -65,12 +65,19 @@
#include "qimage.h"
#include "qgl_p.h"
+#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
#include "gl2paintengineex/qpaintengineex_opengl2_p.h"
+#endif
#ifndef QT_OPENGL_ES_2
#include <private/qpaintengine_opengl_p.h>
#endif
+#ifdef Q_WS_QWS
+#include <private/qglpaintdevice_qws_p.h>
+#include <private/qglwindowsurface_qws_p.h>
+#endif
+
#include <qglpixelbuffer.h>
#include <qglframebufferobject.h>
@@ -4428,7 +4435,11 @@ void QGLDrawable::swapBuffers()
void QGLDrawable::makeCurrent()
{
previous_fbo = 0;
+#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
if (!pixmapData && !fbo) {
+#else
+#endif
+ if (!fbo) {
QGLContext *ctx = context();
previous_fbo = ctx->d_ptr->current_fbo;
ctx->d_ptr->current_fbo = 0;
@@ -4561,8 +4572,10 @@ QColor QGLDrawable::backgroundColor() const
{
if (widget)
return widget->palette().brush(widget->backgroundRole()).color();
+#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
else if (pixmapData)
return pixmapData->fillColor();
+#endif
return QApplication::palette().brush(QPalette::Background).color();
}
@@ -4590,8 +4603,10 @@ bool QGLDrawable::autoFillBackground() const
{
if (widget)
return widget->autoFillBackground();
+#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
else if (pixmapData)
return pixmapData->needsFill();
+#endif
else
return false;
}