[osg-users] How to check if pagedLod already exists in databasepager with same filename

Simone Rapposelli simone.rapposelli at gmail.com
Tue Nov 29 06:17:31 PST 2016


Hi Laurence,

thank you, if you mean somthing like options->setObjectCacheHint(osgDB::Options::CACHE_NODES), I have just tried with no luck...

Voerman, L. wrote:
> would that not just replicate the osg filecache? readNode should just return the pointer to the data with readResult FILE_LOADED_FROM_CACHEregards, Laurens.
> 
> 
> On Tue, Nov 29, 2016 at 1:56 PM, Trajce Nikolov NICK < ()> wrote:
> 
> > Hi Simone,
> > 
> > just a fast thought ... Maybe you make a simple std::map to keep track of what has been loaded and what is new
> > 
> > 
> > On Tue, Nov 29, 2016 at 1:37 PM, Simone Rapposelli < ()> wrote:
> > 
> > > Hi Robert,
> > > 
> > > thank you for your fast reply.
> > > My problem is that osgDB::ReaderWriter::ReadResult readNode(const std::string &fileName, const osgDB::ReaderWriter::Options *options) gets called even if a PagedLod with the same fileName has been previously loaded: for example, this happens if I move to any position on the viewer and then come back.
> > > Thus, inside this function I need to check if any of the PagedLod currently loaded in DatabasePager has the same fileName of the passed argument: in this case I could avoid to reload data already in memory.
> > > 
> > > Thank you!
> > > 
> > > Cheers,
> > > Simone
> > > 
> > > ------------------
> > > Read this topic online here:
> > > http://forum.openscenegraph.org/viewtopic.php?p=69524#69524 (http://forum.openscenegraph.org/viewtopic.php?p=69524#69524)
> > > 
> > > 
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > osg-users mailing list
> > >  ()
> > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > > 
> > > 
> > > 
> > 
> > 
> > 
> > 
> > 
> > 
> > -- 
> > trajce nikolov nick
> > 
> > 
> > 
> > _______________________________________________
> > osg-users mailing list
> >  ()
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > 
> > 
> 
> 
>  ------------------
> Post generated by Mail2Forum


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69529#69529








More information about the osg-users mailing list