Prasad Pokala wrote:
Hi,
Hi,
I am new to OSG. I have a following code inside my c++ application to run OSGViewer.
osg::Group* root;
osgViewer::Viewer viewer;
root = new osg::Group();
........
......... ( setting up the viewer/adding geometry).
root->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
viewer.setSceneData( root );
viewer.realize();
viewer.run();
// wants to continue with my c++ stuff
// some c++ code here
int p;
function1();
........
........
By above code I have added some triangles to the scene. and able to run the
osgviewer. After running the osgviewer I am unable to reach to function1();
untill and unless i close the osgviewer. Seems like osgviewer is runnig in
singlethread and its not allowing me to do anything else.
It's not single-threaded, but you're calling the run() method of viewer,
which doesn't return until you call viewer.setDone(true) in a callback
or something.
If you change it to:
while (!viewer.done())
{
viewer.frame()
<put your stuff here>
}
You should get what you need.
--"J"
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org