#include <osgDB/WriteFile>
#include <simgear/math/SGMath.hxx>
-#include <simgear/screen/extensions.hxx>
#include <simgear/scene/material/matlib.hxx>
#include <simgear/scene/model/animation.hxx>
#include <simgear/scene/model/placement.hxx>
#include <Time/light.hxx>
#include <Time/light.hxx>
-#include <Aircraft/aircraft.hxx>
#include <Cockpit/panel.hxx>
#include <Cockpit/cockpit.hxx>
#include <Cockpit/hud.hxx>
#include <Instrumentation/HUD/HUD.hxx>
#include <Environment/precipitation_mgr.hxx>
-#include <Include/general.hxx>
#include "splash.hxx"
#include "renderer.hxx"
#include "main.hxx"
// Update all Visuals (redraws anything graphics related)
void
FGRenderer::update( bool refresh_camera_settings ) {
- bool scenery_loaded = fgGetBool("sim/sceneryloaded")
+ bool scenery_loaded = fgGetBool("sim/sceneryloaded", false)
|| fgGetBool("sim/sceneryloaded-override");
osgViewer::Viewer* viewer = globals->get_renderer()->getViewer();
- if ( idle_state < 1000 || !scenery_loaded ) {
- fgSetDouble("/sim/startup/splash-alpha", 1.0);
-
- // Keep resetting sim time while the sim is initializing
- // the splash screen is now in the scenegraph
- globals->set_sim_time_sec( 0.0 );
- return;
+ if (!scenery_loaded) {
+ fgSetDouble("/sim/startup/splash-alpha", 1.0);
+ return;
}
// Fade out the splash screen over the first three seconds.
thesky->set_visibility(visibility_meters);
double altitude_m = fgGetDouble("/position/altitude-ft") * SG_FEET_TO_METER;
- thesky->modify_vis( altitude_m,
- ( global_multi_loop * fgGetInt("/sim/speed-up") )
- / (double)fgGetInt("/sim/model-hz") );
+ thesky->modify_vis( altitude_m, 0.0 /* time factor, now unused */);
// update the sky dome
if ( skyblend ) {
scolor.cloud_color = SGVec3f(l->cloud_color().data());
scolor.sun_angle = l->get_sun_angle();
scolor.moon_angle = l->get_moon_angle();
-
+
+ double delta_time_sec = fgGetDouble("/sim/time/delta-sec");
thesky->reposition( sstate, *globals->get_ephem(), delta_time_sec );
thesky->repaint( scolor, *globals->get_ephem() );