diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-08-26 12:50:18 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-08-26 15:33:01 (GMT) |
commit | 6682b9915d80238ce97594909074aef974a74279 (patch) | |
tree | 73fc6b8293df5172b6e0c2e0cee528f80fa65c85 /examples/opengl | |
parent | ca57a8122970ed408f50fed05f77d3a973676165 (diff) | |
download | Qt-6682b9915d80238ce97594909074aef974a74279.zip Qt-6682b9915d80238ce97594909074aef974a74279.tar.gz Qt-6682b9915d80238ce97594909074aef974a74279.tar.bz2 |
Improved QPainter API for allowing native painting in GL / VG.
Previously we were using QPaintEngine::syncState() which is not ideal
naming-wise, since it actually prepares for native painting instead of
syncing the painter's state to native state.
Reviewed-by: Trond
Diffstat (limited to 'examples/opengl')
-rw-r--r-- | examples/opengl/hellogl_es2/glwidget.cpp | 4 |
1 files changed, 3 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); |