1
0
Fork 0

Add a configuration property to turn on/off the use of point sprites.

Generally you want point sprites for performance reasons when enhanced runway
lighting (and smooth points) are activated.  Most hardware doesn't
accelerate the rendering of standard smooth points, so without point sprites
you will kill your night time performance if you turn on enhanced runway
lighting.

Note that enhanced runway lighting "breaks" our clever scheme to make the
runway lighting brightness vary with the relative view angle.  This means
with enhanced lighting on, all lights are equally bright no matter what
direction you view them from.  So perpendicular runways are just as bright
as runways you are directly lined up with (when enhanced runway lighthing
is activated.)

You can revert to the original lighting scheme by turning off enhance runway
lights, turning off distance-attenuation, and turning off point-sprites in
the rendering options menu.
This commit is contained in:
curt 2006-07-20 03:47:39 +00:00
parent 5831d99fc0
commit 0cec9290db

View file

@ -233,6 +233,7 @@ FGRenderer::update( bool refresh_camera_settings ) {
bool draw_otw = fgGetBool("/sim/rendering/draw-otw"); bool draw_otw = fgGetBool("/sim/rendering/draw-otw");
bool skyblend = fgGetBool("/sim/rendering/skyblend"); bool skyblend = fgGetBool("/sim/rendering/skyblend");
bool use_point_sprites = fgGetBool("/sim/rendering/point-sprites");
bool enhanced_lighting = fgGetBool("/sim/rendering/enhanced-lighting"); bool enhanced_lighting = fgGetBool("/sim/rendering/enhanced-lighting");
bool distance_attenuation = fgGetBool("/sim/rendering/distance-attenuation"); bool distance_attenuation = fgGetBool("/sim/rendering/distance-attenuation");
bool volumetric_clouds = sgEnviro.get_clouds_enable_state(); bool volumetric_clouds = sgEnviro.get_clouds_enable_state();
@ -583,6 +584,12 @@ FGRenderer::update( bool refresh_camera_settings ) {
// CLO - 02/25/2005 - DO WE NEED THIS extra fgSetNearFar()? // CLO - 02/25/2005 - DO WE NEED THIS extra fgSetNearFar()?
// fgSetNearFar( scene_nearplane, scene_farplane ); // fgSetNearFar( scene_nearplane, scene_farplane );
if ( use_point_sprites ) {
glEnable(GL_POINT_SPRITE);
} else {
glDisable(GL_POINT_SPRITE);
}
if ( enhanced_lighting ) { if ( enhanced_lighting ) {
// Enable states for drawing points with GL_extension // Enable states for drawing points with GL_extension