diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-04-09 14:20:26 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-04-09 14:20:26 (GMT) |
commit | 7558db24cea4912b8082275821ea390527d2a911 (patch) | |
tree | 115a5c6d02e87c9161278c871d0c1c82047d98af /src/opengl/qgl.cpp | |
parent | 254f093dff864f574e05540e771e1fa6d6c4f7c5 (diff) | |
download | Qt-7558db24cea4912b8082275821ea390527d2a911.zip Qt-7558db24cea4912b8082275821ea390527d2a911.tar.gz Qt-7558db24cea4912b8082275821ea390527d2a911.tar.bz2 |
Don't use texture-from-pixmap if the target isn't GL_TEXTURE_2D
Task-number: QTBUG-8546
Reviewed-By: TrustMe
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r-- | src/opengl/qgl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index e56b149..5595e02 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -2442,7 +2442,8 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target, // Try to use texture_from_pixmap const QX11Info *xinfo = qt_x11Info(paintDevice); if (pd->classId() == QPixmapData::X11Class && pd->pixelType() == QPixmapData::PixmapType - && xinfo && xinfo->screen() == pixmap.x11Info().screen()) + && xinfo && xinfo->screen() == pixmap.x11Info().screen() + && target == GL_TEXTURE_2D) { texture = bindTextureFromNativePixmap(const_cast<QPixmap*>(&pixmap), key, options); if (texture) { |