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:
parent
dc76290d6e
commit
fb52b013f0
1 changed files with 8 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue