Hi Nguyen;

OpenSceneGraph has multithreaded structure on drawing, culling and some kind
of operation and singleThreaded structure on update traversal. So if you
want to add or remove some nodes from your scene graph you should do this
operation any updating operation sector. For example you can create one
update callback and you can do these operation in it. Or you have to stop
viewer renderer and then you do your add-remove operation and then start
threading again. So application doesn't crash. But stopping and starting
renderer thread is not best solution. This is my humble opinion.

Regards.

Ümit Uzun


2009/8/18 Nguyen Cuong <manhcuong111...@yahoo.com>

> Hi,
> I'm new mem, i have some problems that want suggetion. i use osg 2.8.2 in
> MFC viewer, in my scene, i have a root(osg::Group), and i can add object to
> root, remove all object in root(init scene again). but when i use
> removeChilden(0,root->getNumChildren()), my app run not well, some time it
> crash  :( . Please give me some idea for it!
>
> ...
>
>
> Thank you!
>
> Cheers,
> Nguyen
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=16366#16366
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to