From 023b5a09f718eff4d0808584f41fef5cc4a4d7ae Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Wed, 19 Nov 2014 17:23:29 +0100 Subject: [PATCH] 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 --- simgear/scene/model/modellib.cxx | 1 + 1 file changed, 1 insertion(+) 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()); -- 2.39.5