]> git.mxchange.org Git - flightgear.git/commitdiff
Fix moon drawing at night.
authorcurt <curt>
Wed, 28 Mar 2001 17:52:40 +0000 (17:52 +0000)
committercurt <curt>
Wed, 28 Mar 2001 17:52:40 +0000 (17:52 +0000)
src/FDM/flight.cxx
src/Main/main.cxx

index 22ee59ef661a986cf5a269c471720f4b1be9ea6a..574856b9bf1a903df91ad2256d63800bde510491 100644 (file)
@@ -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
index d457557ebdd3614fe69360de46077f2a95407434..e12dab4e5ae060471b27ebde5caf2193d2cf07ae 100644 (file)
@@ -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