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

Reply via email to