From: curt Date: Wed, 1 Mar 2000 00:31:35 +0000 (+0000) Subject: Working on skydome ... some actual progress has been made. :-) Still X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=138863b3e2726ba6895a4290b5628ddb2cdc48c2;p=flightgear.git Working on skydome ... some actual progress has been made. :-) Still something goofy with sunrise, sunset effects. --- diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 75ddf1feb..7051e6795 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -57,7 +57,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/Main/keyboard.cxx b/src/Main/keyboard.cxx index ce58ec8a9..cfbab6e8e 100644 --- a/src/Main/keyboard.cxx +++ b/src/Main/keyboard.cxx @@ -47,7 +47,7 @@ #include #include -#include +// #include #include #include #include @@ -75,9 +75,9 @@ static void local_update_sky_and_lighting_params( void ) { // fgSunInit(); SolarSystem::theSolarSystem->rebuild(); cur_light_params.Update(); - current_sky.repaint( cur_light_params.sky_color, + /* current_sky.repaint( cur_light_params.sky_color, cur_light_params.fog_color, - cur_light_params.sun_angle ); + cur_light_params.sun_angle ); */ } diff --git a/src/Main/main.cxx b/src/Main/main.cxx index d3ab52c99..ad019ceb3 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -74,7 +74,7 @@ #include #include -#include +#include #include #include @@ -310,18 +310,21 @@ void fgRenderFrame( void ) { // ssg does to set up the model view matrix xglMatrixMode(GL_MODELVIEW); xglLoadIdentity(); + + /* sgMat4 vm_tmp, view_mat; sgTransposeNegateMat4 ( vm_tmp, current_view.VIEW ) ; sgCopyMat4( view_mat, copy_of_ssgOpenGLAxisSwapMatrix ) ; sgPreMultMat4( view_mat, vm_tmp ) ; xglLoadMatrixf( (float *)view_mat ); + */ // draw sky xglDisable( GL_DEPTH_TEST ); - xglDisable( GL_LIGHTING ); + // xglDisable( GL_LIGHTING ); xglDisable( GL_CULL_FACE ); - xglDisable( GL_FOG ); + xglDisable( GL_TEXTURE_2D ); /* if ( current_options.get_fog() > 0 ) { xglEnable( GL_FOG ); xglFogi( GL_FOG_MODE, GL_EXP2 ); @@ -339,6 +342,10 @@ void fgRenderFrame( void ) { current_view.get_cur_zero_elev().y(), current_view.get_cur_zero_elev().z() ); + current_sky.repaint( cur_light_params.sky_color, + cur_light_params.fog_color, + cur_light_params.sun_angle ); + current_sky.reposition( zero_elev, cur_fdm_state->get_Longitude(), cur_fdm_state->get_Latitude(), @@ -351,6 +358,8 @@ void fgRenderFrame( void ) { // xglDisable( GL_FOG ); + /* + // setup transformation for drawing astronomical objects xglPushMatrix(); // Translate to view position @@ -373,6 +382,7 @@ void fgRenderFrame( void ) { glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ; xglPopMatrix(); + */ // draw scenery if ( current_options.get_shading() ) { @@ -530,9 +540,9 @@ void fgRenderFrame( void ) { // << current_weather.get_visibility() ); if ( agl > 10.0 ) { - ssgSetNearFar( 10.0f, 100000.0f ); + ssgSetNearFar( 10.0f, 120000.0f ); } else { - ssgSetNearFar( 0.5f, 100000.0f ); + ssgSetNearFar( 0.5f, 120000.0f ); } if ( current_options.get_view_mode() == @@ -1339,7 +1349,6 @@ int main( int argc, char **argv ) { sky = new ssgRoot; sky->setName( "Sky" ); current_sky.initialize( sky ); - scene->addKid( sky ); // temporary visible aircraft "own ship" penguin_sel = new ssgSelector;