diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-08-28 13:15:03 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-08-31 10:25:32 (GMT) |
commit | 8d95b39b19a1a0ba0b86772683bdb79acbcd3e62 (patch) | |
tree | 2a2771dc8cd158f355d03ade092159d95d854757 | |
parent | 5d3a2b852aaaa66f120ab4d8618900dfa603e359 (diff) | |
download | Qt-8d95b39b19a1a0ba0b86772683bdb79acbcd3e62.zip Qt-8d95b39b19a1a0ba0b86772683bdb79acbcd3e62.tar.gz Qt-8d95b39b19a1a0ba0b86772683bdb79acbcd3e62.tar.bz2 |
Fixed inverted pixmaps when using OpenGL graphics effects.
QGL2PaintEngineExPrivate::drawTexture() texture coordinates have been
inverted, so they need to be inverted here too.
Reviewed-by: Kim
-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 bc4b103..895dd65 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1184,9 +1184,11 @@ void QGL2PaintEngineEx::drawTexture(const QRectF &dest, GLuint textureId, const glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT); glBindTexture(GL_TEXTURE_2D, textureId); + QGLRect srcRect(src.left(), src.bottom(), src.right(), src.top()); + d->updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE, state()->renderHints & QPainter::SmoothPixmapTransform, textureId); - d->drawTexture(dest, src, size, false); + d->drawTexture(dest, srcRect, size, false); } void QGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &textItem) |