Hi All,

in the attempt of enabling texture sharing when loading a scene at
application startup,
I've tried to use the SharedStateManager class as suggested in other posts,
creating an instance of it in the Registry via:
Registry::instance()->getOrCreateSharedStateManager()

But after checking the code I've realized the SharedStateManager is used
only by the DatabasePager when merging new subgraphs,
and not by the Registry itself in methods like readNode()/Image/etc...
which means that direct calls to load new objects don't make use of the
state sharing.

Is this the intended behaviour?
I'd have expected that installing a sharing manager into the Registry would
have influenced all calls that load some resource.

Of course the "workaround" is to add somewhere an explicit call
to SharedStateManager->share(),
but I wanted to understand why the sharing mechanism is not used by the
Registry automatically.

Thank you,
Ricky
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to