Re: [osg-users] Texture cache question
Hi, Nick! *osgconv* with *--enable-object-cache *option can help too. KOS 2015-03-11 17:32 GMT+04:00 Trajce Nikolov NICK trajce.nikolov.n...@gmail.com: Thanks Robert. Sebastian, yes, that is the thing I am after. Thanks a lot! Nick On Wed, Mar 11, 2015 at 9:49 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Nick, The osgDB::SharedStateManager might well be what you are looking for. It's not something I wrote or have used so can't provide lots of details on how best to use it, but I can say it's role is for sharing state between an already loaded scene graph and new loaded scene graph. Sebastian's suggestion about the using the Object Cache feature of osgDB::Registry is useful too for sharing osg::Image, which will help the SharedStateManager spot places where osg::Texture can be shared when they use the same osg::Image. Robert. On 10 March 2015 at 16:24, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Hi Community, what was the way to have textures cached and reused on load? any hint? Thanks a bunch! Nick -- trajce nikolov nick ___ 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 -- trajce nikolov nick ___ 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] Texture cache question
Hi Nick, Is this what you are looking for? snip osgDB::ReaderWriter::Options* opt = osgDB::Registry::instance()-getOptions(); if (nullptr == opt) { opt = new osgDB::ReaderWriter::Options(); } //setup caching osgDB::Options::CacheHintOptions opts; opts = static_castosgDB::Options::CacheHintOptions(opts |osgDB::Options::CACHE_IMAGES); opts = static_castosgDB::Options::CacheHintOptions(opts |osgDB::Options::CACHE_NODES); opt-setObjectCacheHint(static_castosgDB::Options::CacheHintOptions(opts)); osgDB::Registry::instance()-setOptions(opt); /snip Hi Community, what was the way to have textures cached and reused on load? any hint? Thanks a bunch! Nick -- trajce nikolov nick ___ 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] Texture cache question
Hi Nick, The osgDB::SharedStateManager might well be what you are looking for. It's not something I wrote or have used so can't provide lots of details on how best to use it, but I can say it's role is for sharing state between an already loaded scene graph and new loaded scene graph. Sebastian's suggestion about the using the Object Cache feature of osgDB::Registry is useful too for sharing osg::Image, which will help the SharedStateManager spot places where osg::Texture can be shared when they use the same osg::Image. Robert. On 10 March 2015 at 16:24, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Hi Community, what was the way to have textures cached and reused on load? any hint? Thanks a bunch! Nick -- trajce nikolov nick ___ 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] Texture cache question
Thanks Robert. Sebastian, yes, that is the thing I am after. Thanks a lot! Nick On Wed, Mar 11, 2015 at 9:49 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Nick, The osgDB::SharedStateManager might well be what you are looking for. It's not something I wrote or have used so can't provide lots of details on how best to use it, but I can say it's role is for sharing state between an already loaded scene graph and new loaded scene graph. Sebastian's suggestion about the using the Object Cache feature of osgDB::Registry is useful too for sharing osg::Image, which will help the SharedStateManager spot places where osg::Texture can be shared when they use the same osg::Image. Robert. On 10 March 2015 at 16:24, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Hi Community, what was the way to have textures cached and reused on load? any hint? Thanks a bunch! Nick -- trajce nikolov nick ___ 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 -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Texture cache question
Hi Community, what was the way to have textures cached and reused on load? any hint? Thanks a bunch! Nick -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org