Hi Jimmy, If you are doing the frame loop you know when it's the first frame before you just place any viewer setup prior to the frame loop. The _firstFrame code block you see if just a fallback in case the viewer hasn't already been setup.
Robert. On Wed, Aug 19, 2009 at 10:49 PM, Jimmy Lin<[email protected]> wrote: > Hi, > > Here is the code of frame() > > > Code: > void ViewerBase::frame(double simulationTime) > { > if (_done) return; > > if (_firstFrame) > { > viewerInit(); > > if (!isRealized()) > { > realize(); > } > > _firstFrame = false; > } > advance(simulationTime); > > eventTraversal(); > updateTraversal(); > renderingTraversals(); > } > > > > It calls viewerInit() on the first frame. > Don't I need to do that myself if I expand the code? > By looking at the viewerInit() code. I think I might be able to expand the > code and init all the view I created. > > Thank you! > > Cheers, > Jimmy > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=16447#16447 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

