summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2010-02-02 09:18:15 (GMT)
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2010-02-02 09:18:15 (GMT)
commit787824cb4add4d45a0e90fd736a54e75fa048475 (patch)
treed06fc6bbc26a450d2ff322bf989532934aa0351e /src/opengl/gl2paintengineex
parent0d3159120674ae8fd8f941d104cf03120305b4dc (diff)
downloadQt-787824cb4add4d45a0e90fd736a54e75fa048475.zip
Qt-787824cb4add4d45a0e90fd736a54e75fa048475.tar.gz
Qt-787824cb4add4d45a0e90fd736a54e75fa048475.tar.bz2
Fixed missing textures in the boxes demo.
The boxes demo assumed that the current GL colour was the default white, but the GL2 paint engine set it to black. Fixed by resetting the colour to white in resetGLState(). Task-number: QTBUG-7779 Reviewed-by: Trond
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 35e95be..406112a 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -561,6 +561,7 @@ void QGL2PaintEngineExPrivate::resetGLState()
glDisableVertexAttribArray(QT_TEXTURE_COORDS_ATTR);
glDisableVertexAttribArray(QT_VERTEX_COORDS_ATTR);
glDisableVertexAttribArray(QT_OPACITY_ATTR);
+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f); // color may have been changed by glVertexAttrib()
}
void QGL2PaintEngineEx::endNativePainting()