summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-05-28 19:06:42 +0200
committerSamuel Rødal <sroedal@trolltech.com>2009-05-28 19:07:58 +0200
commit866813b6779a27e974c30d1023a5d734fa0318c9 (patch)
tree861900503e05d10e9f519bfcdcdf24a1a3b74731
parentf22350c32392da6b3dc2af2c9079d312f262f441 (diff)
downloadqt4-tools-866813b6779a27e974c30d1023a5d734fa0318c9.tar.gz
Fixed bug in GL graphics system when painting to pixmaps.
Make sure the correct texture unit is active when copying from the pixmap to the FBO in begin().
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 75422a224e..e7b6ee4c0f 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1009,8 +1009,11 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev)
}
glClear(GL_COLOR_BUFFER_BIT);
} else if (source) {
+ QGLContext *ctx = d->ctx;
+
d->transferMode(ImageDrawingMode);
+ glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
source->bind(false);
QRect rect(0, 0, source->width(), source->height());