Hi,
it's possible to do threading of QGLWidget using QThreads (at least it
was possible three years ago).
It was written about in the Qt newsletter at that time so if you have
that... ;-) if not take a look at
http://lists.trolltech.com/qt-interest/2000-11/thread00052-0.html
Cheers,
/ulrich
Mathias Froehlich wrote:
Hi,
On Monday 15 January 2007 20:56, Ben Cain wrote:
Is there an example (or even hints) showing the proper way to add threading
to the QOsgWidget class developed by Gazihan Alankus? See the method
QOsgWidget::paintGL() and it’s calls to osgUtil methods: update(), cull(),
and draw().
I’d prefer to use QThreads if possible.
I’ve looked through the Producer code and it’s usage of threads (e.g.
Camera, RenderSurface). But, QOsgWidget isn’t based upon Producer.
Keep in mind that you can't use any QWidget (QOsgWidget : public QGLWidget :
public QWidget) in an other thread than the main thread. That means
especially the update and draw stuff.
I have not yet tried that, but:
The only thing I could think of haveing multithreaded rendering with qt is to
open a new X11 window that could be embedded using QX11EmbedWindow et. al.
into your qwidget hierarchy. Drawing into additional X11 connections without
the knowledge of qt could then be done in seperate threads. The required
communication between the qt based window and the opengl window about
repaints, focus changes and so on is done by the X11 server and the XEmbed
protocol.
For win32 I have not yet thought about something similar ...
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/