WS30 - Clear WS30 data on tile unload
Previously WS30 data from STG files - in particular road/rail/river data - was kept permanently. This change unloads it with the STG-level tile. This is the right level to do so, as it will be reloaded from tile when the STG file is loaded again.
This commit is contained in:
parent
ebe511439a
commit
56996cc01a
1 changed files with 6 additions and 0 deletions
|
@ -36,6 +36,7 @@
|
||||||
#include <simgear/structure/exception.hxx>
|
#include <simgear/structure/exception.hxx>
|
||||||
#include <simgear/scene/model/modellib.hxx>
|
#include <simgear/scene/model/modellib.hxx>
|
||||||
#include <simgear/scene/util/SGReaderWriterOptions.hxx>
|
#include <simgear/scene/util/SGReaderWriterOptions.hxx>
|
||||||
|
#include <simgear/scene/tgdb/VPBTechnique.hxx>
|
||||||
#include <simgear/scene/tsync/terrasync.hxx>
|
#include <simgear/scene/tsync/terrasync.hxx>
|
||||||
#include <simgear/misc/strutils.hxx>
|
#include <simgear/misc/strutils.hxx>
|
||||||
#include <simgear/scene/material/matlib.hxx>
|
#include <simgear/scene/material/matlib.hxx>
|
||||||
|
@ -497,6 +498,11 @@ void FGTileMgr::update_queues(bool& isDownloadingScenery)
|
||||||
|
|
||||||
tile_cache.clear_entry(drop_index);
|
tile_cache.clear_entry(drop_index);
|
||||||
|
|
||||||
|
if (_use_vpb) {
|
||||||
|
// Clear out any VPB data - e.g. roads
|
||||||
|
simgear::VPBTechnique::unloadFeatures(old->get_tile_bucket());
|
||||||
|
}
|
||||||
|
|
||||||
osg::ref_ptr<osg::Object> subgraph = old->getNode();
|
osg::ref_ptr<osg::Object> subgraph = old->getNode();
|
||||||
old->removeFromSceneGraph();
|
old->removeFromSceneGraph();
|
||||||
delete old;
|
delete old;
|
||||||
|
|
Loading…
Reference in a new issue