void
FGTileCache::fill_in( int index, const FGBucket& p )
{
- cout << "FILL IN CACHE ENTRY = " << index << endl;
+ // cout << "FILL IN CACHE ENTRY = " << index << endl;
// Force some values in case the tile fails to load (i.e. fill
// doesn't exist)
terrain->addKid( tile_cache[index].select_ptr );
if ( tile_cache[index].is_scheduled_for_cache() ) {
- cout << "FOUND ONE SCHEDULED FOR CACHE" << endl;
+ // cout << "FOUND ONE SCHEDULED FOR CACHE" << endl;
// load, but not needed now so disable
tile_cache[index].mark_loaded();
tile_cache[index].ssg_disable();
tile_cache[index].select_ptr->select(0);
} else {
- cout << "FOUND ONE READY TO LOAD" << endl;
+ // cout << "FOUND ONE READY TO LOAD" << endl;
tile_cache[index].mark_loaded();
tile_cache[index].select_ptr->select(1);
}
void
FGTileCache::entry_free( int cache_index )
{
- cout << "FREEING CACHE ENTRY = " << cache_index << endl;
+ // cout << "FREEING CACHE ENTRY = " << cache_index << endl;
tile_cache[cache_index].free_tile();
}
// index.
if ( max_index >=0 ) {
- FG_LOG( FG_TERRAIN, FG_INFO, " max_dist = " << max_dist );
- FG_LOG( FG_TERRAIN, FG_INFO, " index = " << max_index );
+ FG_LOG( FG_TERRAIN, FG_DEBUG, " max_dist = " << max_dist );
+ FG_LOG( FG_TERRAIN, FG_DEBUG, " index = " << max_index );
entry_free( max_index );
return( max_index );
} else {
void
FGTileEntry::free_tile()
{
- FG_LOG( FG_TERRAIN, FG_INFO,
+ FG_LOG( FG_TERRAIN, FG_DEBUG,
"FREEING TILE = (" << tile_bucket << ")" );
// mark tile unused
mark_unused();
- // delete fragment list
- FG_LOG( FG_TERRAIN, FG_INFO,
+ // delete fragment list and node list
+ FG_LOG( FG_TERRAIN, FG_DEBUG,
" deleting " << fragment_list.size() << " fragments" );
- // for_each( begin(), end(),
- // mem_fun_ref( &fgFRAGMENT::deleteDisplayList ));
- fragment_list.erase( begin(), end() );
+ fragment_list.clear();
+ FG_LOG( FG_TERRAIN, FG_DEBUG,
+ " deleting " << nodes.size() << " nodes" );
+ nodes.clear();
- // delete the ssg used structures
- FG_LOG( FG_TERRAIN, FG_INFO,
+ // delete the ssg structures
+ FG_LOG( FG_TERRAIN, FG_DEBUG,
" deleting vertex, normal, and texture coordinate arrays" );
- FG_LOG( FG_TERRAIN, FG_INFO,
+ FG_LOG( FG_TERRAIN, FG_DEBUG,
" deleting vertex array" );
if ( vtlist != NULL ) {
delete vtlist;
}
- FG_LOG( FG_TERRAIN, FG_INFO,
+ FG_LOG( FG_TERRAIN, FG_DEBUG,
" deleting normal array" );
if ( vnlist != NULL ) {
delete vnlist;
}
- FG_LOG( FG_TERRAIN, FG_INFO,
+ FG_LOG( FG_TERRAIN, FG_DEBUG,
" deleting texture coordinate array" );
if ( tclist != NULL ) {
delete tclist;
for ( int i = 0; i < kcount; ++i ) {
ssgEntity *kid = parent->getKid( i );
if ( kid == select_ptr ) {
- FG_LOG( FG_TERRAIN, FG_INFO,
+ FG_LOG( FG_TERRAIN, FG_DEBUG,
"Found a kid to delete " << kid);
found_kid = true;
}