From b09dd9976572faa5f298363c21789681fe65dfe6 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 27 Oct 2010 11:52:54 +0200 Subject: 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 --- src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 8 ++++---- 1 file 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(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 { -- cgit v0.12