summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-05-28 17:06:42 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-05-28 17:07:58 (GMT)
commit866813b6779a27e974c30d1023a5d734fa0318c9 (patch)
tree861900503e05d10e9f519bfcdcdf24a1a3b74731 /src/opengl
parentf22350c32392da6b3dc2af2c9079d312f262f441 (diff)
downloadQt-866813b6779a27e974c30d1023a5d734fa0318c9.zip
Qt-866813b6779a27e974c30d1023a5d734fa0318c9.tar.gz
Qt-866813b6779a27e974c30d1023a5d734fa0318c9.tar.bz2
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().
Diffstat (limited to 'src/opengl')
-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 75422a2..e7b6ee4 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());