summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-10-27 09:52:54 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-10-27 10:02:47 (GMT)
commitb09dd9976572faa5f298363c21789681fe65dfe6 (patch)
tree6fdb5629942a7c0a6c7b8bcca0a1d4b631721686
parent2925995de32f76a72fcdd7d577e609a68a517fa1 (diff)
downloadQt-b09dd9976572faa5f298363c21789681fe65dfe6.zip
Qt-b09dd9976572faa5f298363c21789681fe65dfe6.tar.gz
Qt-b09dd9976572faa5f298363c21789681fe65dfe6.tar.bz2
Make sure the correct attribute arrays are enabled in GL's glyph cache
The scene graph does not update the context's attribute array settings, so depending on the order of events, the calls to enable the vertex array etc. might be ignored. Reviewed-by: Kim
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index b8576cb..66c9ba8 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -238,10 +238,10 @@ void QGLTextureGlyphCache::resizeTextureData(int width, int height)
glVertexAttribPointer(QT_TEXTURE_COORDS_ATTR, 2, GL_FLOAT, GL_FALSE, 0, m_textureCoordinateArray);
m_blitProgram->bind();
- QGLContextPrivate* ctx_d = const_cast<QGLContextPrivate *>(ctx->d_func());
- ctx_d->setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, true);
- ctx_d->setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, true);
- ctx_d->setVertexAttribArrayEnabled(QT_OPACITY_ATTR, false);
+ m_blitProgram->enableAttributeArray(int(QT_VERTEX_COORDS_ATTR));
+ m_blitProgram->enableAttributeArray(int(QT_TEXTURE_COORDS_ATTR));
+ m_blitProgram->disableAttributeArray(int(QT_OPACITY_ATTR));
+
blitProgram = m_blitProgram;
} else {