diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-02-18 13:54:51 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-04-01 14:32:51 (GMT) |
commit | d903f379470fb9f9159fbf37f2cfc02638cd05f6 (patch) | |
tree | 2c3211bb9f8492337601303c7420a424ae4fbf59 /src/opengl/qgl.cpp | |
parent | 6513e4b9513dfc591c53744517f05aa3c522ace3 (diff) | |
download | Qt-d903f379470fb9f9159fbf37f2cfc02638cd05f6.zip Qt-d903f379470fb9f9159fbf37f2cfc02638cd05f6.tar.gz Qt-d903f379470fb9f9159fbf37f2cfc02638cd05f6.tar.bz2 |
Fixes: Enable use of the GL pixmap backend in the GL 2 paint engine.
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r-- | src/opengl/qgl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 7c42039..558897d 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1888,14 +1888,14 @@ GLuint QGLContextPrivate::bindTexture(const QImage &image, GLenum target, GLint /*! \internal */ GLuint QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target, GLint format, bool clean) { -#if !defined(QT_OPENGL_ES_2) - if (target == qt_gl_preferredTextureTarget() && pixmap.pixmapData()->classId() == QPixmapData::OpenGLClass) { - const QGLPixmapData *data = static_cast<const QGLPixmapData *>(pixmap.pixmapData()); + Q_Q(QGLContext); + QPixmapData *pd = pixmap.pixmapData(); + if (target == qt_gl_preferredTextureTarget() && pd->classId() == QPixmapData::OpenGLClass) { + const QGLPixmapData *data = static_cast<const QGLPixmapData *>(pd); - if (data->isValidContext(QGLContext::currentContext())) + if (data->isValidContext(q)) return data->bind(); } -#endif const qint64 key = pixmap.cacheKey(); GLuint id; |