From 6e0e056ca79484ecdf95d79d86053f19e0724a53 Mon Sep 17 00:00:00 2001 From: ehofman Date: Fri, 2 Apr 2004 19:44:04 +0000 Subject: [PATCH] Fix an NVidia problem by moving the hack to another location. --- simgear/scene/sky/sky.cxx | 6 +++--- simgear/scene/sky/sky.hxx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/simgear/scene/sky/sky.cxx b/simgear/scene/sky/sky.cxx index e95a7302..df4505f5 100644 --- a/simgear/scene/sky/sky.cxx +++ b/simgear/scene/sky/sky.cxx @@ -168,7 +168,7 @@ bool SGSky::reposition( SGSkyState &st, double dt ) // draw background portions of the sky ... do this before you draw the // rest of your scene. -void SGSky::preDraw( float alt ) { +void SGSky::preDraw( float alt, float fog_exp2_density ) { ssgCullAndDraw( pre_root ); // if we are closer than this to a cloud layer, don't draw clouds @@ -200,15 +200,15 @@ void SGSky::preDraw( float alt ) { { ++cur_layer_pos; } -} -void SGSky::drawUpperClouds( float fog_exp2_density ) { // FIXME: This should not be needed, but at this time (08/15/2003) // certain NVidia drivers don't seem to implement // glPushAttrib(FG_FOG_BIT) properly. The result is that // there is not fog when looking at the sun. glFogf ( GL_FOG_DENSITY, fog_exp2_density ); +} +void SGSky::drawUpperClouds( ) { // draw the cloud layers that are above us, top to bottom for ( int i = (int)cloud_layers.size() - 1; i >= cur_layer_pos; --i ) { if ( i != in_cloud ) { diff --git a/simgear/scene/sky/sky.hxx b/simgear/scene/sky/sky.hxx index 2bee33da..166e717f 100644 --- a/simgear/scene/sky/sky.hxx +++ b/simgear/scene/sky/sky.hxx @@ -334,7 +334,7 @@ public: * class description. * @param alt current altitude */ - void preDraw( float alt ); + void preDraw( float alt, float fog_exp2_density ); /** * Draw upper translucent clouds ... do this before you've drawn @@ -342,7 +342,7 @@ public: * detailed class description. * @param fog_exp2_density fog density of the current cloud layer */ - void drawUpperClouds( float fog_exp2_density ); + void drawUpperClouds(); /** * Draw lower translucent clouds ... do this after you've drawn -- 2.39.5