[osg-users] enabling image cache

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Wed Aug 5 05:04:15 PDT 2020


thanks Per !

On Sun, Aug 2, 2020 at 6:10 PM OpenSceneGraph Users <
osg-users at 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::ReaderWriter::Options;
>
> options->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_IMAGES);
>     osgDB::Registry::instance()->setOptions(options);
>
> But I haven't tried it myself.
>
> Regards,
> Per
>
>
>
> On Sat, 1 Aug 2020 at 17:05, Trajce Nikolov NICK <
> trajce.nikolov.nick at gmail.com> wrote:
>
>> 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 this message because you are subscribed to the Google Groups
>> "OpenSceneGraph Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to osg-users+unsubscribe at googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/osg-users/CAO-%2BzikVOcbto4u832jz-wC%2BqoU3NJi09drbhzSmuVDgf5cEMw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/osg-users/CAO-%2BzikVOcbto4u832jz-wC%2BqoU3NJi09drbhzSmuVDgf5cEMw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscribe at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/CA%2BJHv0SG6SJ1UwGUHMaQv%3DNWgdO%2BcYA%3D128hvZqezHvcCUfj8g%40mail.gmail.com
> <https://groups.google.com/d/msgid/osg-users/CA%2BJHv0SG6SJ1UwGUHMaQv%3DNWgdO%2BcYA%3D128hvZqezHvcCUfj8g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
trajce nikolov nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200805/e43fcaa6/attachment.html>


More information about the osg-users mailing list