From 866813b6779a27e974c30d1023a5d734fa0318c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 28 May 2009 19:06:42 +0200 Subject: 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(). --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 3 +++ 1 file changed, 3 insertions(+) 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()); -- cgit v0.12