1
0
Fork 0

#232: early propagation of "point sprites for runway lights" switch

Property value is required early during initialization since the feature
isn't run-time configurable. Disable run-time calls since it has no effect.
This commit is contained in:
ThorstenB 2011-07-31 13:33:11 +02:00
parent 6c52a5ac85
commit b0a4299d46

View file

@ -440,6 +440,13 @@ FGRenderer::init( void )
_cloud_status = fgGetNode("/environment/clouds/status", true); _cloud_status = fgGetNode("/environment/clouds/status", true);
_visibility_m = fgGetNode("/environment/visibility-m", true); _visibility_m = fgGetNode("/environment/visibility-m", true);
bool use_point_sprites = _point_sprites->getBoolValue();
bool enhanced_lighting = _enhanced_lighting->getBoolValue();
bool distance_attenuation = _distance_attenuation->getBoolValue();
SGConfigureDirectionalLights( use_point_sprites, enhanced_lighting,
distance_attenuation );
} }
void void
@ -619,14 +626,17 @@ FGRenderer::update( bool refresh_camera_settings ) {
_splash_alpha->setDoubleValue(sAlpha); _splash_alpha->setDoubleValue(sAlpha);
} }
bool skyblend = _skyblend->getBoolValue(); #if 0 // OSGFIXME
bool use_point_sprites = _point_sprites->getBoolValue(); // OSGFIXME: features no longer available or no longer run-time configurable
bool enhanced_lighting = _enhanced_lighting->getBoolValue(); {
bool distance_attenuation = _distance_attenuation->getBoolValue(); bool use_point_sprites = _point_sprites->getBoolValue();
bool enhanced_lighting = _enhanced_lighting->getBoolValue();
// OSGFIXME bool distance_attenuation = _distance_attenuation->getBoolValue();
SGConfigureDirectionalLights( use_point_sprites, enhanced_lighting,
distance_attenuation ); SGConfigureDirectionalLights( use_point_sprites, enhanced_lighting,
distance_attenuation );
}
#endif
FGLight *l = static_cast<FGLight*>(globals->get_subsystem("lighting")); FGLight *l = static_cast<FGLight*>(globals->get_subsystem("lighting"));
@ -653,6 +663,7 @@ FGRenderer::update( bool refresh_camera_settings ) {
} }
osg::Camera *camera = viewer->getCamera(); osg::Camera *camera = viewer->getCamera();
bool skyblend = _skyblend->getBoolValue();
if ( skyblend ) { if ( skyblend ) {
if ( _textures->getBoolValue() ) { if ( _textures->getBoolValue() ) {