Hi Adrian, Big frame drops are typically down to deleting old, or compiling new GL objects( texture objects, vertex buffer objects and display lists). The DatabasePager has support for incrementally pre-compiling GL objects to help reduce the chance of causing a frame break due to GL objects, but for recent versions of the OSG that has been switched off as for modern cards and well balanced scene graphs it's no longer usually necessary. The incremental compile of GL objects does limit how quickly new tiles can be merged so increasing the latency between when the tile if first requested and when it's finally seen on screen if you can do without it you app will look better.
To enable pre compile you need to use DatabasePager::setDoPreCompile(true). Enabling pre-compile isn't the only thing you can do. Using GL compressed and pre-mipmapped textures in your databases can make a huge difference. Making sure texture sizes are consistent so as much texture reuse can be done as possible - lots of different texture sizes means lots of separate texture objects that can't be reused, and if you can't reuse expired texture objects then you end up having to delete them and create new ones, something that is far more expensive and likely to cause frame drops. Also balancing your scene graph so that no one tile introduces too much new texture or geometry, aim to have each child of a quad tree around the same complexity. Finally try different graphics cards and OS's as they both can make a big difference. My personally experience with OSX is that it's doesn't tend to do that well for database paging as the GL drivers don't tend to be as good as the ones under Windows and Linux. Robert. On Mon, Mar 15, 2010 at 11:03 AM, Adrian Lindberg <[email protected]> wrote: > So I've been getting in to OSG, much thanks to the help here on the mailing > list/forum. But I'm having some issues with performance which I can't seem to > pinpoint. > > I use extensive PagedLOD, in a similar way osgTerrain does it (using > quad-trees). For me performance is the king and quality is secondary, so I > want to have a frame rate that is at least 30 fps at all times (given some > minimum requirements). When all LODs are loaded I get constant 60 fps which > is due to the screen synch and when moving around I tend to get 20-30 fps due > to loading. However, it is not uncommon that the fps dips completely and > falls to sub 1 fps for a short while (up to a few seconds) and then resumes > the 20-30 fps target. > > What I've tried so far is to set the setMaximumNumOfObjectsToCompilePerFrame > to a very low value (1) and set the thread priority for the DatabasePager to > low. I'm using VBO:s for vertex data and am currently running OSX 10.6 with > OSG 2.9.6. For me it's vital to get rid of these dip, I'd much rather display > low res data then getting drops. > > Profiling for me through Xcode seems to put the DatabasePager out of order so > I can't really pinpoint why I'm getting these drops. > > Any ideas or suggestions? > > Cheers, > Adrian > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=25647#25647 > > > > > > _______________________________________________ > 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

