Hi Evan, Which version of the OSG are you using?
Robert. On Fri, Apr 10, 2009 at 6:07 PM, Evan Andersen <andersen.e...@gmail.com>wrote: > I'm working on an application which uses osgEarth to display terrain > databases to users. I need the application to use as little CPU time as > possible while still providing good user interaction, so I have set my > viewer up so that it only renders when necessary. I keep a loop running > that does the event and update traversals, but the renderingTraversals are > only done when requestRedraw or requestContinuousUpdate have been called. > This seems to work fine and to the user it generally beahves the same as > when the scene is continuously rendered. However, when viewing the high > detail levels it database pager often gets stuck in a loop when it keeps > reloading a set of tiles over and over. You see the tiles alternately go > blurry and then sharp again as the continously reload. > > I don't know what is causing this, but if I switch to continuous render, so > that every event and update traversal is followed by a render, the problem > does not occur. It seems to happen most often loading earth files with > high-res data, like the yahoo or google test files, and then moving the > camera around at the high detail levels. Unfortunately, I can't seem to > replicate the problem with an animation path. I have attached a simple > viewer I created that implements the rendering method I described above. > The important code is in the viewer's frame function. I've pasted it below > in case anyone can tell at a glance what I'm doing wrong. If someone who > knows the database pager well could take a look at this I would really > appreciate it. > > Thanks, > Evan > > > advance(simulationTime); > > eventTraversal(); > > // If the database pager is going to update the scene the render > flag is > // set so that the updates show up > if(getDatabasePager()->requiresUpdateSceneGraph()) > needsRender = true; > > updateTraversal(); > > if(needsRender || continuousUpdate) > { > renderingTraversals(); > needsRender = false; > } > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org