Hi Prasad,

I do not have a loop but I will call display() when ever is required. When I wrote only viewer.frame() as soon as it come out of display() the osgwindow(scene) is closing.

Well of course if your viewer instance goes out of scope at the end of display(), the viewer will close.

You need to keep the viewer in an osg::ref_ptr<osgViewer::Viewer> in your class. Then YourClass::display() can call viewer->frame() and your app can call YourClass::display() when it needs to.

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to