TileEntry *tile = tile_cache[cache_index];
tile->removeFromSceneGraph();
- tile->free_tile();
delete tile;
tile_cache.erase( cache_index );
}
-// 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) {
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);