parentCameraIndex = i;
}
if (_cameras.size() <= parentCameraIndex) {
- SG_LOG(SG_GENERAL, SG_ALERT, "CameraGroup::buildCamera: "
+ SG_LOG(SG_VIEW, SG_ALERT, "CameraGroup::buildCamera: "
"failed to find parent camera for relative camera!");
return 0;
}
}
if (!window) { // buildWindow can fail
- SG_LOG(SG_GENERAL, SG_WARN, "CameraGroup::buildGUICamera: failed to build a window");
+ SG_LOG(SG_VIEW, SG_WARN, "CameraGroup::buildGUICamera: failed to build a window");
return NULL;
}
->registerWindow(gc, defaultWindowName);
return defaultWindow;
} else {
- SG_LOG(SG_GENERAL, SG_ALERT, "getDefaultWindow: failed to create GraphicsContext");
+ SG_LOG(SG_VIEW, SG_ALERT, "getDefaultWindow: failed to create GraphicsContext");
return 0;
}
}
tpath = globals->resolve_maybe_aircraft_path(splash_texture);
if (tpath.isNull())
{
- SG_LOG( SG_GENERAL, SG_ALERT, "Cannot find splash screen file '" << splash_texture
+ SG_LOG( SG_VIEW, SG_ALERT, "Cannot find splash screen file '" << splash_texture
<< "'. Using default." );
}
}
// Initialize the splash screen
void fgSplashInit () {
- SG_LOG( SG_GENERAL, SG_INFO, "Initializing splash screen" );
+ SG_LOG( SG_VIEW, SG_INFO, "Initializing splash screen" );
globals->get_renderer()->splashinit();
}
void fgSplashProgress ( const char *text ) {
- SG_LOG( SG_GENERAL, SG_INFO, "Splash screen progress " << text );
+ SG_LOG( SG_VIEW, SG_INFO, "Splash screen progress " << text );
fgSetString("/sim/startup/splash-progress-text", text);
}
FGViewMgr::init ()
{
if (inited) {
- SG_LOG(SG_GENERAL, SG_WARN, "duplicate init of view manager");
+ SG_LOG(SG_VIEW, SG_WARN, "duplicate init of view manager");
return;
}
FGTileMgr::FGTileMgr():
state( Start ),
+ last_state( Running ),
vis( 16000 ),
_terra_sync(NULL)
{
// disk.
void FGTileMgr::update(double)
{
- SG_LOG( SG_TERRAIN, SG_DEBUG, "FGTileMgr::update()" );
SGVec3d viewPos = globals->get_current_view()->get_view_pos();
double vis = _visibilityMeters->getDoubleValue();
schedule_tiles_at(SGGeod::fromCart(viewPos), vis);
// do tile load scheduling.
// Note that we need keep track of both viewer buckets and fdm buckets.
if ( state == Running ) {
- SG_LOG( SG_TERRAIN, SG_DEBUG, "State == Running" );
+ if (last_state != state)
+ {
+ SG_LOG( SG_TERRAIN, SG_DEBUG, "State == Running" );
+ }
if (current_bucket != previous_bucket) {
// We've moved to a new bucket, we need to schedule any
// needed tiles for loading.
// save bucket
previous_bucket = current_bucket;
} else if ( state == Start || state == Inited ) {
- SG_LOG( SG_TERRAIN, SG_INFO, "State == Start || Inited" );
+ SG_LOG( SG_TERRAIN, SG_DEBUG, "State == Start || Inited" );
// do not update bucket yet (position not valid in initial loop)
state = Running;
previous_bucket.make_bad();
}
+ last_state = state;
return 1;
}
Running = 2
};
- load_state state;
-
+ load_state state, last_state;
+
// schedule a tile for loading, returns true when tile is already loaded
bool sched_tile( const SGBucket& b, double priority,bool current_view, double request_time);