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>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2012-07-05 15:21:56 +02:00 committed by Qt by Nokia
parent 13c99ee2f5
commit 2f2d6db09a

View File

@ -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));
}
}