Robert Osfield wrote:
How are you integrating the DatabasePager into your app? I don't see
problems with memory problems like you describe with osgviewer and
osgProducer::Viewer related apps.
Are you able to recreate the problems with these?
Right now I am using osgviewer directly to load a small pre-generated
OSG file with the plod's in it.
The reason why I raise this is that I've pretty heavily tested the
paging and expiry of subgraphs and believe it to work just fine.
I might be entirely off base here so I'll include what I'm doing but
I've mentioned it on here before so I'm operating under the assumption
that what I have here is reasonable.
toplevel_group_node
plod_1 plod_2 plod_3 ...plod_n
Each plod has one active range and one database tied to that range.
Right now the ranges go from 0 to 6*radius of the terrain segment. The
filenames being paged in are ~30MB ive file converted from OpenFlight.
for(unsigned int i=0; i < terrain_filenames.size(); ++i)
{
// obtain center position
double radius = bboxes[i].radius();
osg::Vec3 center = bboxes[i].center();
// setup new lod
osg::PagedLOD *lod = new osg::PagedLOD();
lod->setName("plod for " + terrain_filenames[i]);
lod->setRangeMode(osg::LOD::DISTANCE_FROM_EYE_POINT);
lod->setFileName(0, terrain_filenames[i]);
lod->setPriorityOffset(0, 1);
lod->setPriorityScale(0, 1.0f);
lod->setCenter(center);
lod->setRadius(radius);
lod->setRange(0, 0.0f, bboxes[i].radius() * 6.0); // FIXME
lod->setNumChildrenThatCannotBeExpired(0);
group->addChild(lod);
}
--
Philip Lowman
Simulation Development Engineer, Modeling and Simulation Technology
General Dynamics Land Systems
http://www.gdls.com
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/