summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2012-07-05 15:21:56 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-06 01:38:30 +0200
commit2f2d6db09a04bfe1dee144a13db84c5eeac136ea (patch)
tree1e7c43d4c9775edd6b488a1a2f2924e7af4c2dcd /src/gui/opengl
parent13c99ee2f5c965c2c8ff7b56dade9ddc85dbf954 (diff)
Clean up attribute arrays flags in OpenGL glyph cache
When used in the SceneGraph we're expected to disable the arrays after we're done, otherwise we'll get a warning about memory corruption and crashes. Change-Id: Ie8e426309716bef4b75d79039e8ca0b4943c79e7 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Diffstat (limited to 'src/gui/opengl')
-rw-r--r--src/gui/opengl/qopengltextureglyphcache.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp
index a57c605afa..9d160e6155 100644
--- a/src/gui/opengl/qopengltextureglyphcache.cpp
+++ b/src/gui/opengl/qopengltextureglyphcache.cpp
@@ -269,6 +269,9 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height)
if (pex != 0) {
glViewport(0, 0, pex->width, pex->height);
pex->updateClipScissorTest();
+ } else {
+ m_blitProgram->disableAttributeArray(int(QT_VERTEX_COORDS_ATTR));
+ m_blitProgram->disableAttributeArray(int(QT_TEXTURE_COORDS_ATTR));
}
}