From 2f2d6db09a04bfe1dee144a13db84c5eeac136ea Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 5 Jul 2012 15:21:56 +0200 Subject: 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 --- src/gui/opengl/qopengltextureglyphcache.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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)); } } -- cgit v1.2.3