From: Torsten Dreyer Date: Wed, 19 Nov 2014 16:23:29 +0000 (+0100) Subject: Make expiry time for paged models settable from props X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=023b5a09f718eff4d0808584f41fef5cc4a4d7ae;p=simgear.git Make expiry time for paged models settable from props Our paged models used the default minimumExpiryTime of zero seconds which caused frequent stutter with AI traffic loaded. This patch sets the minimumExpiryTime to 180 seconds, more than enough to hold the models in memory during a full standard rate turn. The property to set the expiry time is /sim/rendering/plod-minimum-expiry-time-secs --- diff --git a/simgear/scene/model/modellib.cxx b/simgear/scene/model/modellib.cxx index efbcd136..4b3ae1d6 100644 --- a/simgear/scene/model/modellib.cxx +++ b/simgear/scene/model/modellib.cxx @@ -160,6 +160,7 @@ SGModelLib::loadPagedModel(const string &path, SGPropertyNode *prop_root, plod->setName("Paged LOD for \"" + path + "\""); plod->setFileName(0, path); plod->setRange(0, 0.0, 50.0*SG_NM_TO_METER); + plod->setMinimumExpiryTime( 0, prop_root->getDoubleValue("/sim/rendering/plod-minimum-expiry-time-secs", 180.0 ) ); osg::ref_ptr opt; opt = SGReaderWriterOptions::copyOrCreate(osgDB::Registry::instance()->getOptions());