1
0
Fork 0

Clear OSG object cache on scenery reload

Scenery reload (menu: Debug-> Reload Scenery) also needs to clear the OSG
object cache, otherwise scenery isn't really reloaded from disk.
This commit is contained in:
ThorstenB 2011-04-15 21:34:44 +02:00
parent dc76290d6e
commit fb52b013f0

View file

@ -88,6 +88,8 @@ FGTileMgr::~FGTileMgr() {
group->removeChildren(0, group->getNumChildren());
delete _propListener;
_propListener = NULL;
// clear OSG cache
osgDB::Registry::instance()->clearObjectCache();
}
@ -122,6 +124,12 @@ void FGTileMgr::reinit()
group->removeChildren(0, group->getNumChildren());
tile_cache.init();
// clear OSG cache, except on initial start-up
if (state != Start)
{
osgDB::Registry::instance()->clearObjectCache();
}
state = Inited;
previous_bucket.make_bad();