summaryrefslogtreecommitdiffstats
path: root/examples/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl')
-rw-r--r--examples/opengl/hellogl_es2/glwidget.cpp4
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);