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 ...

    Greetings

              Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to