Hi,
Thanks for the suggestion -- setting auto buffer swap to false and doing
the swaps manually helps alleviate the issue, but I'm still getting
strange results when resizing or when rendering a new scene (the widget
becomes painted over with the last used QPen's color).
I think I will experiment with drawing overlays info a framebuffer
object and rendering that last, and keeping everything inside paintGL --
that seems to be more stable for me.
Thanks,
-geordan
On 2/22/11 4:21 AM, Marcus Lindblom wrote:
Geordan Rosario skrev 2011-02-21 07:17:
Hi,
I have several QGLWidgets sharing the same OpenGL context (using
shareWidget). Using the overpainting example I have been able to get
basic text overlaid on a single QGLWidget by overriding paintEvent
instead of paintGL and using QPainter.drawText(). However, when using
multiple QGLWidgets, it appears that GL-rendered graphics aren't always
being drawn to the widget, whether I call update() or repaint(); all I
get is a blank background with my overlaid text. I can see the code
doing the actual GL rendering being called, but nothing shows up.
However, if I remove the calls to QPainter and call the method paintGL
instead of paintEvent, everything updates correctly. What is going on?
Looks like your app is making too many glSwapBuffers() calls for both
of your issues.
Not sure what the exact problem is here, but I strongly suspect the
above. Maybe it'll help you resolve your problem.
(There is an option to do buffer swaps manually ... also, mixing gl
and non-gl drawing requires a careful approach, from what I've read)
Cheers,
/Marcus
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside