Hi all,

I'm in the process of redesigning our OSG application (the current
version is little better than a proof-of-principle prototype, and
wasn't written by me) and I'm trying to sort out how the threads will
interact.  The application has to render imagery from one or more
views of a common scene which is updated via a network connection.
The rendered imagery will probably need to be delivered back over the
network, either by reading back each frame or by using a separate
video capture card.

My current plan is to have a thread which interacts with the network
and converts the packets into updates to the scene graph, then have a
second thread which does the rendering, and possibly a third thread to
readback and compress the imagery (though this may be done separately
via a video capture card).  I am also considering a fourth thread to
do the "scene management" stuff, like applying updates from the
network and loading models in the background, but I'm not sure how
necessary this is.

So my questions are as follows:

Is my architecture sensible?
 -   Is there a 'better' way to do it?
 -   How closely should I integrate my application with OSG?  From a
design point of view I'm tempted to create lots of adapters or facades
(ie "do it properly"), but as I will also be the one doing the
implementation I'm not sure I can be bothered.

How easy is it use OSG in a multi-threaded environment?
 -   Do I need to provide my own mutual exclusion code when modifying
the scene graph or is it already taken care of?

I think I will need each of the viewpoints to be rendered to a
separate window, what is the best mechanism for doing this?
 -   Each view should use the same scene graph except they will each
have a different set of render passes and some different shaders and
uniforms, is this achievable, and how?
 -   Will each view need to run in a separate thread, or can they all
run in one thread?  Are there performance implications either way?

Thanks in advance for any help.

Rob.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to