One way Basically you need to create a message/data passing system between the GUI and the APP update thread that is thread safe.
In the GUI thread when you want to add a request to be carried out in the APP you get a lock on the message queue you created ( generally I use a wait until lock required on the GUI side), then add your message or messages to the queue Then on the app side during the APP update I would attempt to get a lock on the queue ( in this case it would be a try and continue, so if you cannot get a lock just try again next frame), once you can get a lock you can consume the queues messages and take the action requested in the messages , (you might on service only N of Me messages if you have a lot.) and then release the queue once you have consumed the messages. Etc This works well for me Gordon Product Manager 3d __________________________________________________________ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com __________________________________________________________ -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Prasad Pokala Sent: Monday, September 21, 2009 11:12 AM To: [email protected] Subject: Re: [osg-users] OSG Threading Hi All & Jean , Jean Thanks its working well. I have some other question I have created a small user interface where you can browse the model(tree view).I can select or unselect geometry from tree view . Visualization of the model as shown inside a other form in same window. (till here no problems I can see my model. but if i want to add more geometry to scene from tree view). since osgviewer is running as some loop(frame() or run()). I am not able to select or unselect more geometry from tree view. How can I do this??,How can i get the control back to the tree view after display. Do not hesitate to ask if you have any problems in understanding. Thank you! Cheers, Prasad ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17530#17530 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

