Prasad Pokala wrote:
Hi Jason & Robert,

Thanks for the reply. When I set viewer.setDone(true) the osg window(scene) is closing. I want the OSGWindow should be operational(running) and wants to work with my rest of the application.
[color=orange]Class1[/color]
{
    Class2 scene;
// My applicaion
   (c++ stuff)
    .......
    .......
     scene.display();
(After displaying the the scene wants to continue with my application ) .........
    .........
    .........
}

[color=orange]Class2[/color]   // class for displaying the scene and geometry
{
     void disply()
    {
      // Here i have the code for setting up viewer and displaying      geometry
      osgViewer viewer;
      ........
      .......
      .......
After everything finishes wants to display viewer
     for ex I have done this
            viewer.run();
or while (!viewer.done())
             {
viewer.frame() ........ } return 0; // wants to reach this point with osg is running } // After display wants to go back to parent class(Class1) }


When i done viewer.frame() or viewer.run() or what ever I am in inside osg main 
loop. Hence I am not able to go back and continue with my application. I know 
that with viewer.setDone(true) , able to come out of loop but without 
osgwindow(scene).

Is there any way to display osg scene and continue with my rest of the application?? Is it possible for displaying the scene with out going into osg main loop??

Does your program already have a loop that constantly calls that disply() method? If so, then all you should need to do is have a single call to viewer.frame() at the end (there's no need to create another loop if you're already looping).

--"J"

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

Reply via email to