diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-09-09 14:23:19 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-09-09 14:30:17 (GMT) |
commit | 417e05fe128f0fd1bf5d309e3667b057a094bda3 (patch) | |
tree | f2a78e3aaa80f8022598ffd1317cb8057f452780 /examples | |
parent | 47f0c5506065e4cef7e2faa6c702f7bc243be88b (diff) | |
download | Qt-417e05fe128f0fd1bf5d309e3667b057a094bda3.zip Qt-417e05fe128f0fd1bf5d309e3667b057a094bda3.tar.gz Qt-417e05fe128f0fd1bf5d309e3667b057a094bda3.tar.bz2 |
Updated the pbuffers2 example to make it work with the GL2 engine.
Added begin/endNativePainting() calls.
Reviewed-by: Trond
Diffstat (limited to 'examples')
-rw-r--r-- | examples/opengl/pbuffers2/glwidget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/opengl/pbuffers2/glwidget.cpp b/examples/opengl/pbuffers2/glwidget.cpp index e1c9b5c..e4d320b 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)); |