Merge branch 'next' of gitorious.org:fg/flightgear into next
This commit is contained in:
commit
df796a4899
2 changed files with 3 additions and 6 deletions
|
@ -390,7 +390,6 @@ FGRenderer::FGRenderer()
|
||||||
jpgRenderFrame = FGRenderer::update;
|
jpgRenderFrame = FGRenderer::update;
|
||||||
#endif
|
#endif
|
||||||
eventHandler = new FGEventHandler;
|
eventHandler = new FGEventHandler;
|
||||||
_splash_screen_active = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FGRenderer::~FGRenderer()
|
FGRenderer::~FGRenderer()
|
||||||
|
@ -428,6 +427,7 @@ FGRenderer::init( void )
|
||||||
|
|
||||||
_xsize = fgGetNode("/sim/startup/xsize", true);
|
_xsize = fgGetNode("/sim/startup/xsize", true);
|
||||||
_ysize = fgGetNode("/sim/startup/ysize", true);
|
_ysize = fgGetNode("/sim/startup/ysize", true);
|
||||||
|
_splash_alpha = fgGetNode("/sim/startup/splash-alpha", true);
|
||||||
|
|
||||||
_skyblend = fgGetNode("/sim/rendering/skyblend", true);
|
_skyblend = fgGetNode("/sim/rendering/skyblend", true);
|
||||||
_point_sprites = fgGetNode("/sim/rendering/point-sprites", true);
|
_point_sprites = fgGetNode("/sim/rendering/point-sprites", true);
|
||||||
|
@ -599,12 +599,11 @@ FGRenderer::update( bool refresh_camera_settings ) {
|
||||||
{
|
{
|
||||||
// alas, first "update" is being called before "init"...
|
// alas, first "update" is being called before "init"...
|
||||||
fgSetDouble("/sim/startup/splash-alpha", 1.0);
|
fgSetDouble("/sim/startup/splash-alpha", 1.0);
|
||||||
_splash_screen_active = true;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
osgViewer::Viewer* viewer = globals->get_renderer()->getViewer();
|
osgViewer::Viewer* viewer = globals->get_renderer()->getViewer();
|
||||||
|
|
||||||
if (_splash_screen_active)
|
if (_splash_alpha->getDoubleValue()>0.0)
|
||||||
{
|
{
|
||||||
// Fade out the splash screen
|
// Fade out the splash screen
|
||||||
const double fade_time = 0.8;
|
const double fade_time = 0.8;
|
||||||
|
@ -615,7 +614,6 @@ FGRenderer::update( bool refresh_camera_settings ) {
|
||||||
double sAlpha = fgGetDouble("/sim/startup/splash-alpha", 1.0);
|
double sAlpha = fgGetDouble("/sim/startup/splash-alpha", 1.0);
|
||||||
sAlpha -= SGMiscd::max(0.0,delay_time/fade_time);
|
sAlpha -= SGMiscd::max(0.0,delay_time/fade_time);
|
||||||
FGScenerySwitchCallback::scenery_enabled = (sAlpha<1.0);
|
FGScenerySwitchCallback::scenery_enabled = (sAlpha<1.0);
|
||||||
_splash_screen_active = (sAlpha > 0.0);
|
|
||||||
fgSetDouble("/sim/startup/splash-alpha", sAlpha);
|
fgSetDouble("/sim/startup/splash-alpha", sAlpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ protected:
|
||||||
osg::ref_ptr<osgViewer::Viewer> viewer;
|
osg::ref_ptr<osgViewer::Viewer> viewer;
|
||||||
osg::ref_ptr<flightgear::FGEventHandler> eventHandler;
|
osg::ref_ptr<flightgear::FGEventHandler> eventHandler;
|
||||||
SGPropertyNode_ptr _scenery_loaded,_scenery_override;
|
SGPropertyNode_ptr _scenery_loaded,_scenery_override;
|
||||||
SGPropertyNode_ptr _skyblend;
|
SGPropertyNode_ptr _skyblend, _splash_alpha;
|
||||||
SGPropertyNode_ptr _point_sprites, _enhanced_lighting, _distance_attenuation;
|
SGPropertyNode_ptr _point_sprites, _enhanced_lighting, _distance_attenuation;
|
||||||
SGPropertyNode_ptr _textures;
|
SGPropertyNode_ptr _textures;
|
||||||
SGPropertyNode_ptr _cloud_status, _visibility_m;
|
SGPropertyNode_ptr _cloud_status, _visibility_m;
|
||||||
|
@ -87,7 +87,6 @@ protected:
|
||||||
SGPropertyNode_ptr _panel_hotspots, _sim_delta_sec, _horizon_effect, _altitude_ft;
|
SGPropertyNode_ptr _panel_hotspots, _sim_delta_sec, _horizon_effect, _altitude_ft;
|
||||||
SGPropertyNode_ptr _virtual_cockpit;
|
SGPropertyNode_ptr _virtual_cockpit;
|
||||||
SGTimeStamp _splash_time;
|
SGTimeStamp _splash_time;
|
||||||
bool _splash_screen_active;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool fgDumpSceneGraphToFile(const char* filename);
|
bool fgDumpSceneGraphToFile(const char* filename);
|
||||||
|
|
Loading…
Reference in a new issue