diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-04-09 08:50:20 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-04-09 08:59:01 (GMT) |
commit | 0d1be2406cb58a51ef5a7271fbf5e191fe50ab91 (patch) | |
tree | e0a4b64de6056922e48429e6efbb3f3bc98ed4cc /src/opengl/gl2paintengineex | |
parent | b69d5d35e0705a494aff6dfd021dde1ace1b3d7b (diff) | |
download | Qt-0d1be2406cb58a51ef5a7271fbf5e191fe50ab91.zip Qt-0d1be2406cb58a51ef5a7271fbf5e191fe50ab91.tar.gz Qt-0d1be2406cb58a51ef5a7271fbf5e191fe50ab91.tar.bz2 |
Allow y-interted pixmaps for brushes in GL2 paint engine
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
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |