summaryrefslogtreecommitdiffstats
path: root/examples/opengl
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-09-09 16:23:19 +0200
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-09-09 16:30:17 +0200
commit417e05fe128f0fd1bf5d309e3667b057a094bda3 (patch)
treef2a78e3aaa80f8022598ffd1317cb8057f452780 /examples/opengl
parent47f0c5506065e4cef7e2faa6c702f7bc243be88b (diff)
Updated the pbuffers2 example to make it work with the GL2 engine.
Added begin/endNativePainting() calls. Reviewed-by: Trond
Diffstat (limited to 'examples/opengl')
-rw-r--r--examples/opengl/pbuffers2/glwidget.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/opengl/pbuffers2/glwidget.cpp b/examples/opengl/pbuffers2/glwidget.cpp
index e1c9b5cf3f..e4d320b193 100644
--- a/examples/opengl/pbuffers2/glwidget.cpp
+++ b/examples/opengl/pbuffers2/glwidget.cpp
@@ -136,6 +136,7 @@ void GLWidget::draw()
QPainter p(this); // used for text overlay
// save the GL state set for QPainter
+ p.beginNativePainting();
saveGLState();
// render the 'bubbles.svg' file into our pbuffer
@@ -206,6 +207,7 @@ void GLWidget::draw()
// restore the GL state that QPainter expects
restoreGLState();
+ p.endNativePainting();
// draw the overlayed text using QPainter
p.setPen(QColor(197, 197, 197, 157));