#include <Time/light.hxx>
#include <Time/light.hxx>
#include <Aircraft/aircraft.hxx>
+// #include <Aircraft/replay.hxx>
#include <Cockpit/panel.hxx>
#include <Cockpit/cockpit.hxx>
#include <Cockpit/hud.hxx>
#include <Scenery/scenery.hxx>
#include <Scenery/tilemgr.hxx>
#include <ATC/ATCdisplay.hxx>
-#include <Replay/replay.hxx>
#include <GUI/new_gui.hxx>
#include "splash.hxx"
SGAnimation::set_sim_time_sec( 0.0 );
return;
}
+// return;
+ // TODO:TEST only, don't commit that !!
+// sgFXperFrameInit();
+
+ extern void sgShaderFrameInit(double delta_time_sec);
+ sgShaderFrameInit(delta_time_sec);
bool draw_otw = fgGetBool("/sim/rendering/draw-otw");
bool skyblend = fgGetBool("/sim/rendering/skyblend");
// calculate our current position in cartesian space
Point3D cntr = globals->get_scenery()->get_next_center();
globals->get_scenery()->set_center(cntr);
- current__view->set_scenery_center(cntr);
+ // Force update of center dependent values ...
+ current__view->set_dirty();
if ( refresh_camera_settings ) {
// update view port
glEnable( GL_FOG );
glFogi( GL_FOG_MODE, GL_EXP2 );
glFogfv( GL_FOG_COLOR, l->adj_fog_color() );
- }
+ } else
+ glDisable( GL_FOG );
// set sun/lighting parameters
ssgGetLight( 0 ) -> setPosition( l->sun_vec() );
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ) ;
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ) ;
- double agl =
- current_aircraft.fdm_state->get_Altitude() * SG_FEET_TO_METER
- - globals->get_scenery()->get_cur_elev();
+ double agl = current__view->getAltitudeASL_ft()*SG_FEET_TO_METER
+ - current__view->getSGLocation()->get_cur_elev_m();
- if ( agl > 50.0 ) {
+ if ( agl > 10.0 ) {
scene_nearplane = 10.0f;
scene_farplane = 120000.0f;
} else {