Hi All, On 11 November 2014 11:17, Robert Osfield <[email protected]> wrote:
> My current inclination is create a new class osgDB::ObjectCache and have > this manage a local std::map<filename, object>, have osgDB::Registry "have > a" ObjectCache, and also let osgDB::Options have a local ObjectCache > ref_ptr<> to manage a local user supplied cache that can be read/written to > in preference. If a local ObjectCache is present then the Registry > ObjectCache would would only be possible to read from, while the local > ObjectCache it'd be possible to read and write to. > > osgDB::Registry::readImplementation() could handle the differences between > the Regisytry and the Options ObjectCache, so loaders wouldn't need to > worry about it unless they specifically wanted to handle it. For the > osgDB::DatabasePager it'd have an empty ObjectCache assigned to the local > Options for each read and would copy any entries into the main > Regisytr::ObjectCache during the merge with main scene graph operation. > I have have now refactored the object cache support in the DatabasePager and Registry so it now uses a local osgDB::ObjectCache assigned to the osgDB::Options object to provide a cache mechanism for each thread doing the reading, with any additions to this local cache is then merged during the DatabasePager's update scene graph operation. This new approach allows for all types of objects to be cached during a load. These changes are now checked into svn/trunk. Pjotr, could you test these changes out? Thanks, Robert.
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

