HI Farshid,

The TargetMaximumNumberOfPageLOD is a hint to the pager to try and
expire inactive PageLOD so that the total number stays at or below the
specified number.  It only expires inactive PagedLOD though, so it's a
target not a hard fast measure, if the current view requires more than
the target then PagedLOD are active and can't be discarded.

If you've found an error in the maths or a better scheme for working
out which to expire then send it along to osg-submissions. The scheme
has to be efficient as not to bog down the pager or update threads.

Robert.

On 21 May 2013 04:41, Farshid Lashkari <fla...@gmail.com> wrote:
> 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
> 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

Reply via email to