Hi,

I'm hoping to get some clarification on how the
DatabasePager::setTargetMaximumNumberOfPageLOD is supposed to work. I am
setting this value to 3 in my application. I then use the following
function to create and add PagedLODs the the scene:

void AddPagedLOD()
{
  osg::ref_ptr<osg::PagedLOD> lod = new osg::PagedLOD;
  lod->addChild( new osg::Group, 10.0f, FLT_MAX );
  lod->setFileName(1,"large.osgb");
  lod->setRange(1,0.0f,10.0f);
  root->addChild(lod);
}

When I add 3 PagedLODs to my scene and have them load the file, they are
never released from memory once I leave the active range. This makes sense
since the number PagedLODs is not above the target.

However, when I add 4 PagedLODs then leave the active range, all 4 files
are released from memory. I was expecting only 1 of the files to be
released.

Am I misunderstanding the behavior of this setting or should only 1 file be
released in this case?

I had a quick glance at the DatabasePager source and was able to make two
small changes to get the behavior I was expecting. However, I don't have
much experience dealing with PagedLODs and wanted to verify that this
should be the correct behavior before submitting a patch.

Cheers,
Farshid
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to