diff options
author | David Boddie <dboddie@trolltech.com> | 2009-08-26 15:50:44 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2009-08-26 15:50:44 (GMT) |
commit | 1be8c6dc12b0158955bf88af450982d6688754d9 (patch) | |
tree | 1b80419c0b8ccd5bab30bc64cf64472b9f6b82c5 /examples/opengl | |
parent | 2b7aaf18660fb6639a97b0421563696648384948 (diff) | |
parent | 9385eebd22e005ff6027594ea643a8f46ed2e3e3 (diff) | |
download | Qt-1be8c6dc12b0158955bf88af450982d6688754d9.zip Qt-1be8c6dc12b0158955bf88af450982d6688754d9.tar.gz Qt-1be8c6dc12b0158955bf88af450982d6688754d9.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'examples/opengl')
-rw-r--r-- | examples/opengl/hellogl_es2/glwidget.cpp | 4 | ||||
-rw-r--r-- | examples/opengl/overpainting/glwidget.cpp | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/examples/opengl/hellogl_es2/glwidget.cpp b/examples/opengl/hellogl_es2/glwidget.cpp index 9a2a83e..50a7797 100644 --- a/examples/opengl/hellogl_es2/glwidget.cpp +++ b/examples/opengl/hellogl_es2/glwidget.cpp @@ -266,7 +266,7 @@ void GLWidget::paintGL() QPainter painter; painter.begin(this); - painter.paintEngine()->syncState(); + painter.beginNativePainting(); glClearColor(0.1f, 0.1f, 0.2f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -302,6 +302,8 @@ void GLWidget::paintGL() glDisable(GL_DEPTH_TEST); glDisable(GL_CULL_FACE); + painter.endNativePainting(); + if (m_showBubbles) foreach (Bubble *bubble, bubbles) { bubble->drawBubble(&painter); 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] |