From 0cec9290db3fe4c7065a21942a07db94e66a793d Mon Sep 17 00:00:00 2001 From: curt Date: Thu, 20 Jul 2006 03:47:39 +0000 Subject: [PATCH] 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. --- src/Main/renderer.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Main/renderer.cxx b/src/Main/renderer.cxx index ac18f8a81..563b6cb1f 100644 --- a/src/Main/renderer.cxx +++ b/src/Main/renderer.cxx @@ -233,6 +233,7 @@ FGRenderer::update( bool refresh_camera_settings ) { bool draw_otw = fgGetBool("/sim/rendering/draw-otw"); bool skyblend = fgGetBool("/sim/rendering/skyblend"); + bool use_point_sprites = fgGetBool("/sim/rendering/point-sprites"); bool enhanced_lighting = fgGetBool("/sim/rendering/enhanced-lighting"); bool distance_attenuation = fgGetBool("/sim/rendering/distance-attenuation"); 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()? // fgSetNearFar( scene_nearplane, scene_farplane ); + if ( use_point_sprites ) { + glEnable(GL_POINT_SPRITE); + } else { + glDisable(GL_POINT_SPRITE); + } + if ( enhanced_lighting ) { // Enable states for drawing points with GL_extension -- 2.39.5