Remove unneeded explicit scenegraph deletion.
Modified Files: simgear/scene/tgdb/TileCache.cxx simgear/scene/tgdb/TileEntry.cxx simgear/scene/tgdb/TileEntry.hxx
This commit is contained in:
parent
a8d1c44408
commit
382e0c6ad2
@ -52,7 +52,6 @@ void TileCache::entry_free( long cache_index ) {
|
||||
TileEntry *tile = tile_cache[cache_index];
|
||||
tile->removeFromSceneGraph();
|
||||
|
||||
tile->free_tile();
|
||||
delete tile;
|
||||
|
||||
tile_cache.erase( cache_index );
|
||||
|
@ -145,19 +145,6 @@ static void WorldCoordinate(osg::Matrix& obj_pos, double lat,
|
||||
}
|
||||
|
||||
|
||||
// Clean up the memory used by this tile and delete the arrays used by
|
||||
// ssg as well as the whole ssg branch
|
||||
bool TileEntry::free_tile() {
|
||||
SG_LOG( SG_TERRAIN, SG_DEBUG,
|
||||
"FREEING TILE = (" << tile_bucket << ")" );
|
||||
|
||||
_node->removeChildren(0, _node->getNumChildren());
|
||||
_node = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Update the ssg transform node for this tile so it can be
|
||||
// properly drawn relative to our (0,0,0) point
|
||||
void TileEntry::prep_ssg_node(float vis) {
|
||||
|
@ -102,14 +102,6 @@ public:
|
||||
|
||||
static void setModelLoadHelper(ModelLoadHelper *m) { _modelLoader=m; }
|
||||
|
||||
// Clean up the memory used by this tile and delete the arrays
|
||||
// used by ssg as well as the whole ssg branch. This does a
|
||||
// partial clean up and exits so we can spread the load across
|
||||
// multiple frames. Returns false if work remaining to be done,
|
||||
// true if dynamically allocated memory used by this tile is
|
||||
// completely freed.
|
||||
bool free_tile();
|
||||
|
||||
// Update the ssg transform node for this tile so it can be
|
||||
// properly drawn relative to our (0,0,0) point
|
||||
void prep_ssg_node(float vis);
|
||||
|
Loading…
Reference in New Issue
Block a user