From 18dec3596d2296eda78d841f1c92e1498125ba37 Mon Sep 17 00:00:00 2001 From: ehofman Date: Wed, 7 May 2003 15:53:50 +0000 Subject: [PATCH] Curtis found another inconsistency in the sky repaint check. I am afraid that adding more checks would eventually give the same framerate as repainting every frame. Consider this a failed experiment. --- src/Main/main.cxx | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/Main/main.cxx b/src/Main/main.cxx index da8bfde6e..6c949d427 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -590,30 +590,7 @@ void fgRenderFrame() { " sun_angle = " << cur_light_params.sun_angle << " moon_angle = " << cur_light_params.moon_angle ); */ - - // Some insane defaults. - static int init = 50; - static double sun_pos_angle = 9999.0; - static double sun_pos_rotation = 9999.0; - static float view_heading = 9999.0; - static float view_heading_offset = 9999.0; - - if ((fabs(sun_pos_rotation - cur_light_params.sun_rotation) > 5e-3) - || (fabs(sun_pos_angle - cur_light_params.sun_angle) > 5e-3) - || (fabs(view_heading - current__view->getHeading_deg()) > 5e-3) - || (fabs(view_heading_offset - - current__view->getHeadingOffset_deg()) > 5e-3) - || init || fgGetBool("/sim/rendering/debug")) - { - if ( init ) - init--; - - sun_pos_angle = cur_light_params.sun_angle; - sun_pos_rotation = cur_light_params.sun_rotation; - view_heading = current__view->getHeading_deg (); - view_heading_offset = current__view->getHeadingOffset_deg(); - - thesky->repaint( cur_light_params.sky_color, + thesky->repaint( cur_light_params.sky_color, cur_light_params.adj_fog_color, cur_light_params.sun_angle, cur_light_params.moon_angle, @@ -621,7 +598,6 @@ void fgRenderFrame() { globals->get_ephem()->getPlanets(), globals->get_ephem()->getNumStars(), globals->get_ephem()->getStars() ); - } /* SG_LOG( SG_GENERAL, SG_BULK,