diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-06-09 00:54:37 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-06-09 00:54:37 (GMT) |
commit | 1bbe23c5814dfda4cc6154c49e5bbf7c6ead7eba (patch) | |
tree | b329314e78cadd712b17edb38c3f0f5753d9acd5 /src/opengl | |
parent | a359abb4ccf5a2dc3bd1fac9836231677b3dc14f (diff) | |
download | Qt-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')
-rw-r--r-- | src/opengl/qgl.cpp | 15 | ||||
-rw-r--r-- | src/opengl/qgl_p.h | 3 | ||||
-rw-r--r-- | src/opengl/qglframebufferobject.cpp | 2 | ||||
-rw-r--r-- | src/opengl/qglpixelbuffer.cpp | 5 |
4 files changed, 21 insertions, 4 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; } diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index b3523d4..4af8598 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -428,8 +428,7 @@ private: extern Q_OPENGL_EXPORT QGLShareRegister* qgl_share_reg(); #ifdef Q_WS_QWS -class QOpenGLPaintEngine; -extern QOpenGLPaintEngine* qt_qgl_paint_engine(); +extern QPaintEngine* qt_qgl_paint_engine(); extern EGLDisplay qt_qgl_egl_display(); #endif diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 3e7ca0a..fb16107 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -43,7 +43,9 @@ #include <qdebug.h> #include <private/qgl_p.h> +#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) #include <private/qpaintengineex_opengl2_p.h> +#endif #ifndef QT_OPENGL_ES_2 #include <private/qpaintengine_opengl_p.h> diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp index 483856a..0af97e3 100644 --- a/src/opengl/qglpixelbuffer.cpp +++ b/src/opengl/qglpixelbuffer.cpp @@ -76,12 +76,13 @@ \sa {opengl/pbuffers}{Pbuffers Example} */ -#include <private/qpaintengineex_opengl2_p.h> - #include <qglpixelbuffer.h> #include <private/qglpixelbuffer_p.h> #include <qimage.h> +#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) +#include <private/qpaintengineex_opengl2_p.h> +#endif #ifndef QT_OPENGL_ES_2 #include <private/qpaintengine_opengl_p.h> #endif |