summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-10-06 12:33:39 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-10-06 12:38:33 (GMT)
commit3874cd95e203da40d5205ef6455d7f56cba6923a (patch)
tree534e3068b791e761defeeedd42436320e5056a42 /src/opengl
parent901ea45ca02dc8fbbf3f6112240c4e468c240b73 (diff)
downloadQt-3874cd95e203da40d5205ef6455d7f56cba6923a.zip
Qt-3874cd95e203da40d5205ef6455d7f56cba6923a.tar.gz
Qt-3874cd95e203da40d5205ef6455d7f56cba6923a.tar.bz2
Fix GL glyph cache with broken-fbo-fallback
When reading from the resized image, we have to use the actual width of the image, since we're reading the bits directly. This used to work because the width never changed. Reviewed-by: Gunnar
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 9a15260..b8576cb 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -164,7 +164,7 @@ void QGLTextureGlyphCache::resizeTextureData(int width, int height)
if (ctx->d_ptr->workaround_brokenFBOReadBack) {
QImageTextureGlyphCache::resizeTextureData(width, height);
Q_ASSERT(image().depth() == 8);
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, oldWidth, oldHeight, GL_ALPHA, GL_UNSIGNED_BYTE, image().constBits());
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, oldHeight, GL_ALPHA, GL_UNSIGNED_BYTE, image().constBits());
glDeleteTextures(1, &oldTexture);
return;
}