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.

After I displayed the osgviewer I want to continue with my c++ stuff with 
background osgviewer is running. 

I guess I have to implement some multithreading to run viewer as well as to 
continue with  c++ stuff.  

Any one has some idea how can i do this??



Thank you!

Cheers,
Prasad

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=17343#17343





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to