From 0d1be2406cb58a51ef5a7271fbf5e191fe50ab91 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Fri, 9 Apr 2010 10:50:20 +0200 Subject: Allow y-interted pixmaps for brushes in GL2 paint engine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This means texture-from-pixmap can now be used for brush pixmaps. Task-number: QTBUG-9707 Task-number: QT-3013 Reviewed-By: Samuel Rødal --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 9ed722f..2275c3d 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -217,7 +217,9 @@ void QGL2PaintEngineExPrivate::updateBrushTexture() const QPixmap& texPixmap = currentBrush.texture(); glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT); - QGLTexture *tex = ctx->d_func()->bindTexture(texPixmap, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption); + QGLTexture *tex = ctx->d_func()->bindTexture(texPixmap, GL_TEXTURE_2D, GL_RGBA, + QGLContext::InternalBindOption | + QGLContext::CanFlipNativePixmapBindOption); updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform); textureInvertedY = tex->options & QGLContext::InvertedYBindOption ? -1 : 1; } -- cgit v0.12