[osg-users] Force osgDB::readNodeFile to not return cached model

Brad Colbert bcolbert at rscusa.com
Thu Nov 7 19:07:00 PST 2019


Hello,

I'm reading a model multiple times using osgDB::readNodeFile.  I'm rotating a part on one of the models but the same part on all of the instances of the model are rotating.

I've looked at the pointer returned from osgDB::readNodeFile for all of the load calls (for the same model file) and they are all the same.  I'm assuming that the model is cached the first time and I'm getting an instance of the cached model for each subsequent call to osgDB::readNodeFile.

I've tried what I think should disable the caching for this instance (from one of the examples):


Code:
// Load the model
osg::ref_ptr<osgDB::Options> options = new osgDB::Options("a=1 b=2 c=3");
options->setObjectCacheHint(osgDB::Options::CACHE_NONE);
osg::Node* model = osgDB::readNodeFile(modelName, options);




How do I turn this off or get around this?

OpenSceneGraph Library 3.6.3

Thank you!

Cheers,
Brad
Code:




------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=76884#76884







More information about the osg-users mailing list