summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-08-28 13:15:03 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-08-31 10:25:32 (GMT)
commit8d95b39b19a1a0ba0b86772683bdb79acbcd3e62 (patch)
tree2a2771dc8cd158f355d03ade092159d95d854757 /src
parent5d3a2b852aaaa66f120ab4d8618900dfa603e359 (diff)
downloadQt-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
Diffstat (limited to 'src')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp4
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)