[osg-users] enabling image cache

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Sun Aug 2 01:33:59 PDT 2020


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 figure out as shared,
none of them look at the internal data.

In the VulkanSceneGraph I have implemented the ability to place objects
that you wish to share into a vsg::Objects container that you can place in
an external file, then the model scenes then reference this with the a
cache ensuring that the vsg::Object container is only loaded once and
shared there after.  The scheme is able to connect all the object IDs
together so everything is consistent.  This scheme only works with native
VSG scene graphs as they obviously have to know about the scheme.

I mention the VSG approach as it should be possible to do something similar
with the OSG, as the OSG has, in principle, most of the required IO
features.

Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200802/ee051bc0/attachment.html>


More information about the osg-users mailing list