Hi Vincent,

The osgviewer stats has scene info collection and works pretty fast so
I'm surprised similar code of yours has problems. Is you scene
particular big?  How many nodes/geometries etc?

As for running in a separate thread when not run the thread in a
parallel to the viewer.renderingTraversals(); just put a barrier
before and after the call to renderingTraversals().

Robert.

On Wed, Apr 22, 2009 at 3:53 PM, Vincent Bourdier
<[email protected]> wrote:
> Hi,
>
> I have a problem of how-to :
>
> I have a function, which need to  run into the graph to count the visible
> and total number of face. This is a code which is not so quick... so I would
> like to put it in a separate thread to avoid my application lags.
> But, my thread isn't synchronized yet, so in case of the graph modification
> ... it crashes.
>
> How can I set my thread to be synchronized with osg threads, keeping the
> thread advantage or parallel process to avoid the user seeing a lag when the
> algorithm traverse the graph ?
>
> This algorithm is based on NodeVisistors, does it change anything ?
>
> Thanks for help.
>
> Regards,
>    Vincent.
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to