Hi Shuiying,

It's not safe to read for a data structure that is written to be
another thread.  If you scene graph is not changing then it'll be safe
to traverse multi-threaded without problem but if it's changing you'll
need to serialize the reading from the writing threads in some manner.
 The normal frame loop that the OSG provides with the update and event
traversal that can do updates occurring single threaded and before the
cull and draw traversals start.

Robert.

On 1 April 2012 09:46, wang shuiying <[email protected]> wrote:
> Hello,
>
> In my programme, I have among others a view node and a thread. The
> geometries under the view node changes every frame. The thread controls the
> frequency at which an IntersectionVisitor visits the view node.
>
> However it turns out it doesn't work. When the intersectionVisitor is ready
> to visit the view node, it stops there, without going further.
>
> If  the visit of intersectionVisitor is made to be a part of  the
> updatecallback of view node, then it works.
>
> I wonder if the intersectionVisitor can work separately from the
> updatecallback of the node that it visits
>
>
> Thank you very much in advance for any advice!
>
> Shuiying
> _______________________________________________
> 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