summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2010-02-01 13:30:15 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2010-02-06 08:19:25 (GMT)
commit34672c99ef704d17f383c1671c039ca424151868 (patch)
tree0253d514de735df11c92709301dee6aa8aaf240d
parent6f40ae1992ce881da26366b35771f325e28dbdd2 (diff)
downloadQt-34672c99ef704d17f383c1671c039ca424151868.zip
Qt-34672c99ef704d17f383c1671c039ca424151868.tar.gz
Qt-34672c99ef704d17f383c1671c039ca424151868.tar.bz2
Fixed garbled 3D Qt logo in the overpainting example.
Disable vertex attribute arrays in the GL2 paint engine when calling QPainter::beginNativePainting() and QPainter::end(). Task-number: QTBUG-7781 Reviewed-by: Trond (cherry picked from commit afe0f17eb5974adbedd1bc1f2fcd98459d92df47)
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 93ef37f..0dcb1f7 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -558,6 +558,9 @@ void QGL2PaintEngineExPrivate::resetGLState()
glStencilMask(0xff);
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
glStencilFunc(GL_ALWAYS, 0, 0xff);
+ glDisableVertexAttribArray(QT_TEXTURE_COORDS_ATTR);
+ glDisableVertexAttribArray(QT_VERTEX_COORDS_ATTR);
+ glDisableVertexAttribArray(QT_OPACITY_ATTR);
}
void QGL2PaintEngineEx::endNativePainting()