[osg-users] Passing explicitly loaded model to DatabasePager for expiry management

2008-09-24 Thread Wojciech Lewandowski
Hi Everyone,

I have quick question. We have added simple ReadCallback to 
osg::IntersectionVisitor to enforce loading of highest PAgedLODs from our 
terrain.
We simply call osgDB::readNodeFile( PageLOD_file ). Intersection works, but it 
looks like these files are not stored in any cache nor they are actually 
attached to parent PagedLOD. Is there a way we can add them to DatabasePager 
loaded model list to avoid further loads of the same file ?

Cheers,
Wojtek
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Passing explicitly loaded model to DatabasePager for expiry management

2008-09-24 Thread Robert Osfield
HI Wojtek,

You could use the osg::Registry object cache for the subgraphs you've loaded.

Robert.

On Wed, Sep 24, 2008 at 11:45 AM, Wojciech Lewandowski
[EMAIL PROTECTED] wrote:
 Hi Everyone,

 I have quick question. We have added simple ReadCallback to
 osg::IntersectionVisitor to enforce loading of highest PAgedLODs from our
 terrain.
 We simply call osgDB::readNodeFile( PageLOD_file ). Intersection works, but
 it looks like these files are not stored in any cache nor they are actually
 attached to parent PagedLOD. Is there a way we can add them to DatabasePager
 loaded model list to avoid further loads of the same file ?

 Cheers,
 Wojtek

 ___
 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


Re: [osg-users] Passing explicitly loaded model to DatabasePager for expiry management

2008-09-24 Thread Glenn Waldron
On Wed, Sep 24, 2008 at 6:45 AM, Wojciech Lewandowski [EMAIL PROTECTED]
 wrote:

  Hi Everyone,

 I have quick question. We have added simple ReadCallback to
 osg::IntersectionVisitor to enforce loading of highest PAgedLODs from our
 terrain.
 We simply call osgDB::readNodeFile( PageLOD_file ). Intersection works, but
 it looks like these files are not stored in any cache nor they are actually
 attached to parent PagedLOD. Is there a way we can add them to DatabasePager
 loaded model list to avoid further loads of the same file ?


One option is to implement a cache in the ReadCallback itself, as
demonstrated in osgSim/LineOfSight.cpp.

Glenn

-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
+1.703.652.4791
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org