From c4b2e54551a0c3384f6c041ffe89187942993f16 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 28 Mar 2001 17:52:40 +0000 Subject: [PATCH] Fix moon drawing at night. --- src/FDM/flight.cxx | 2 +- src/Main/main.cxx | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/FDM/flight.cxx b/src/FDM/flight.cxx index 22ee59ef6..574856b9b 100644 --- a/src/FDM/flight.cxx +++ b/src/FDM/flight.cxx @@ -164,7 +164,7 @@ FGInterface::bind () { // Time management fgTie("/fdm/time/delta_t", this, - &(FGInterface::get_delta_t)); + &FGInterface::get_delta_t); // The following two can't be uncommented until we have support for // the "long" data type in the property manager diff --git a/src/Main/main.cxx b/src/Main/main.cxx index d457557eb..e12dab4e5 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -569,6 +569,7 @@ void fgRenderFrame( void ) { // scene. Thus instead of playing with GL_AMBIENT, we just // set that to black and instead modify GL_LIGHT_MODEL_AMBIENT. GLfloat black[4] = { 0.0, 0.0, 0.0, 1.0 }; + GLfloat white[4] = { 1.0, 1.0, 1.0, 1.0 }; ssgGetLight( 0 ) -> setColour( GL_AMBIENT, black ); glLightModelfv( GL_LIGHT_MODEL_AMBIENT, l->scene_ambient ); @@ -678,7 +679,14 @@ void fgRenderFrame( void ) { if ( fgGetBool("/sim/rendering/skyblend") ) { // draw the sky backdrop + + // we need a white diffuse light for the phase of the moon + ssgGetLight( 0 ) -> setColour( GL_DIFFUSE, white ); + thesky->preDraw(); + + // return to the desired diffuse color + ssgGetLight( 0 ) -> setColour( GL_DIFFUSE, l->scene_diffuse ); } // draw the ssg scene