diff options
author | Trond Kjernåsen <trond@trolltech.com> | 2009-08-26 15:33:21 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond@trolltech.com> | 2009-08-26 15:35:11 (GMT) |
commit | 9385eebd22e005ff6027594ea643a8f46ed2e3e3 (patch) | |
tree | 52dc156fe384c51db75a95474e3db5de90b41743 /examples/opengl | |
parent | a6f19188282b427272f075063a306c7ef98e8a95 (diff) | |
download | Qt-9385eebd22e005ff6027594ea643a8f46ed2e3e3.zip Qt-9385eebd22e005ff6027594ea643a8f46ed2e3e3.tar.gz Qt-9385eebd22e005ff6027594ea643a8f46ed2e3e3.tar.bz2 |
Made the opengl/overpainting example work with the GL 2 engine.
Since the GL 2 engine can't set/unset every single GL state that
a user might possibly change, we have to make a rule that if something
is changed from its default state, it needs to be reset before
the GL 2 engine can draw correctly.
Reviewed-by: Samuel
Diffstat (limited to 'examples/opengl')
-rw-r--r-- | examples/opengl/overpainting/glwidget.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/opengl/overpainting/glwidget.cpp b/examples/opengl/overpainting/glwidget.cpp index a6e6195..cad591f 100644 --- a/examples/opengl/overpainting/glwidget.cpp +++ b/examples/opengl/overpainting/glwidget.cpp @@ -166,6 +166,11 @@ void GLWidget::paintEvent(QPaintEvent *event) //! [7] //! [8] + glShadeModel(GL_FLAT); + glDisable(GL_CULL_FACE); + glDisable(GL_DEPTH_TEST); + glDisable(GL_LIGHTING); + glMatrixMode(GL_MODELVIEW); glPopMatrix(); //! [8] |