From 417e05fe128f0fd1bf5d309e3667b057a094bda3 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Wed, 9 Sep 2009 16:23:19 +0200 Subject: Updated the pbuffers2 example to make it work with the GL2 engine. Added begin/endNativePainting() calls. Reviewed-by: Trond --- examples/opengl/pbuffers2/glwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) 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)); -- cgit v0.12