summaryrefslogtreecommitdiffstats
path: root/src/opengl/qpaintengine_opengl.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-08-26 06:47:40 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-08-27 03:43:22 (GMT)
commit6576cf1ac0ce0443925f5f63f996f0a6be95c5d1 (patch)
tree42bbc519f1e6e002b79e345eeed18f3db9c3c508 /src/opengl/qpaintengine_opengl.cpp
parent878569545a06a904635b273c862a0c41dba298e2 (diff)
downloadQt-6576cf1ac0ce0443925f5f63f996f0a6be95c5d1.zip
Qt-6576cf1ac0ce0443925f5f63f996f0a6be95c5d1.tar.gz
Qt-6576cf1ac0ce0443925f5f63f996f0a6be95c5d1.tar.bz2
New variant of QGLContext::bindTexture that does not require mipmap generation
and y-axis inversion and overall less conversion, making significantly faster for plain usecases Reviewed-by: Trond
Diffstat (limited to 'src/opengl/qpaintengine_opengl.cpp')
-rw-r--r--src/opengl/qpaintengine_opengl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index 9434adf..ade67d3 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -4433,13 +4433,13 @@ void QOpenGLPaintEngine::drawTextureRect(int tx_width, int tx_height, const QRec
if (target == GL_TEXTURE_2D) {
x1 = sr.x() / tx_width;
x2 = x1 + sr.width() / tx_width;
- y1 = 1.0 - (sr.bottom() / tx_height);
- y2 = 1.0 - (sr.y() / tx_height);
+ y1 = 1 - (sr.bottom() / tx_height);
+ y2 = 1 - (sr.y() / tx_height);
} else {
x1 = sr.x();
x2 = sr.right();
- y1 = tx_height - sr.bottom();
- y2 = tx_height - sr.y();
+ y1 = sr.bottom();
+ y2 = sr.y();
}
q_vertexType vertexArray[4*2];