Re: [osg-users] enabling image cache

2020-08-05 Thread OpenSceneGraph Users
thanks Per ! On Sun, Aug 2, 2020 at 6:10 PM OpenSceneGraph Users < osg-users@lists.openscenegraph.org> wrote: > Here is a snippet from osgcatch.cpp: > > // enable the image cache so we don't need to keep loading the > particle files > osgDB::ReaderWriter::Options* options = new > osgDB::R

Re: [osg-users] enabling image cache

2020-08-05 Thread OpenSceneGraph Users
Thanks Robert! On Sun, Aug 2, 2020 at 10:34 AM OpenSceneGraph Users < osg-users@lists.openscenegraph.org> wrote: > HI Nick, > > The osgDB::ObjectCache can be used to share loaded data, so if the images > are loaded from external files this will ensure the data gets shared. > > There is also the u

Re: [osg-users] enabling image cache

2020-08-02 Thread OpenSceneGraph Users
Here is a snippet from osgcatch.cpp: // enable the image cache so we don't need to keep loading the particle files osgDB::ReaderWriter::Options* options = new osgDB::ReaderWriter::Options; options->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_IMAGES); osgDB::Registry::ins

Re: [osg-users] enabling image cache

2020-08-02 Thread OpenSceneGraph Users
HI Nick, The osgDB::ObjectCache can be used to share loaded data, so if the images are loaded from external files this will ensure the data gets shared. There is also the utility for sharing state at runtime, but I don't recall it's name. In each of these cases there is a limit to what it'll fig

[osg-users] enabling image cache

2020-08-01 Thread OpenSceneGraph Users
Hi Community, I have two different files sharing an image. is there a way to cache (without extra coding) the shared resource? for example osgviewer file1 file2 and the image to be loaded once and reused later? Thanks a bunch as always! Cheers, Nick -- trajce nikolov nick ___

[osg-users] enabling image cache

2020-08-01 Thread OpenSceneGraph Users
Hi Community, I have two different files sharing an image. is there a way to cache (without extra coding) the shared resource? for example osgviewer file1 file2 and the image to be loaded once and reused later? Thanks a bunch as always! Cheers, Nick -- trajce nikolov nick -- You received t