summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/opengl/hellogl_es2/glwidget.cpp4
-rw-r--r--examples/openvg/star/starwidget.cpp4
2 files changed, 5 insertions, 3 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/openvg/star/starwidget.cpp b/examples/openvg/star/starwidget.cpp
index 1a64fc9..ab11bdb 100644
--- a/examples/openvg/star/starwidget.cpp
+++ b/examples/openvg/star/starwidget.cpp
@@ -91,7 +91,7 @@ void StarWidget::paintEvent(QPaintEvent *)
// Flush the state changes to the OpenVG implementation
// and prepare to perform raw OpenVG calls.
- painter.paintEngine()->syncState();
+ painter.beginNativePainting();
// Cache the path if we haven't already.
if (path == VG_INVALID_HANDLE) {
@@ -109,7 +109,7 @@ void StarWidget::paintEvent(QPaintEvent *)
vgDrawPath(path, VG_FILL_PATH | VG_STROKE_PATH);
// Restore normal QPainter operations.
- painter.paintEngine()->syncState();
+ painter.endNativePainting();
painter.end();
}