I Lucie

You probably run OSG and  GUI in 2 different thread, and you try to
manipulate OSG data from GUI thread.

You have created the dll C++ that wrappe OSG. So you can modify it.

You need an asynchronous mechanism to say to OSG "add node" or "remove
node" or "anything else"
 like a queue of 'action' fill by GUI and done by OSG.
 ex : GUI create a custom object AddNode that contain a list of file to
add, put it in queue action, then OSG will does,
 at the good time (before event pass), look in queue action and process
action find.

or

You need a synchronisation mechanism in osgViewer::ViewerBase::frame like a
mutex locked before the even pass and unlocked after the cull/draw pass,
and you have to export, from the C++ dll, some function that does action
you want (add node/remove node/...).
this function must lock the mutex before process any action, so you are
sure that your action is not done during even/update/cull pass.


first solution is more complex but your application (GUI thread) will never
be stopped by OSG thread. Their work in asynchronous mode.
The second is perhaps more simple but if OSG take 5 second to do the
action, GUI will freeze during 5 second. Their work in synchronous mode.


HTH
David



2013/3/8 lucie lemonnier <lucielemonn...@hotmail.fr>

> With SingleThreaded, osg also crashes with the same error.
>
> lucie
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=52997#52997
>
>
>
>
>
> _______________________________________________
> 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