X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Frenderer.cxx;h=0e5ecb3e41ffe1f474591a01ee74ec76b300585f;hb=1c3e2d4942fe74dac43f1f6af542f9de7d4825db;hp=fe79a0425995790e44e904a1e362f10b5832f0be;hpb=05f626e9fbcccb24a66147e7cc6b437942b9a220;p=flightgear.git diff --git a/src/Main/renderer.cxx b/src/Main/renderer.cxx index fe79a0425..0e5ecb3e4 100644 --- a/src/Main/renderer.cxx +++ b/src/Main/renderer.cxx @@ -244,7 +244,13 @@ FGRenderer::update( bool refresh_camera_settings ) { 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"); @@ -314,7 +320,8 @@ FGRenderer::update( bool refresh_camera_settings ) { // 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 @@ -383,7 +390,7 @@ FGRenderer::update( bool refresh_camera_settings ) { */ static SGSkyColor scolor; - FGLight *l = (FGLight *)(globals->get_subsystem("lighting")); +// FGLight *l = (FGLight *)(globals->get_subsystem("lighting")); scolor.sky_color = l->sky_color(); scolor.fog_color = l->adj_fog_color(); @@ -489,9 +496,9 @@ FGRenderer::update( bool refresh_camera_settings ) { double agl = current_aircraft.fdm_state->get_Altitude() * SG_FEET_TO_METER - - globals->get_scenery()->get_cur_elev(); + - cur_fdm_state->get_Runway_altitude_m(); - if ( agl > 50.0 ) { + if ( agl > 10.0 ) { scene_nearplane = 10.0f; scene_farplane = 120000.0f; } else { @@ -711,17 +718,7 @@ FGRenderer::update( bool refresh_camera_settings ) { globals->get_aircraft_model()->select( true ); globals->get_model_mgr()->draw(); globals->get_aircraft_model()->draw(); - // If the view is internal, the previous line draw the - // cockpit with modified near/far clip planes and deselect - // the aircraft in the global scenegraph - // Otherwise, it just enables the aircraft: The scenegraph - // must be drawn again to see the plane. - ssgBranch *branch = globals->get_scenery()->get_aircraft_branch(); - // in external view the shadows are drawn before the transparent parts of the ac - if( ! is_internal ) - branch->setTravCallback( SSG_CALLBACK_POSTTRAV, SGShadowVolume::ACpostTravCB); - ssgCullAndDraw( globals->get_scenery()->get_scene_graph() ); - branch->setTravCallback( SSG_CALLBACK_POSTTRAV, 0); + FGTileMgr::set_tile_filter( true ); sgSetModelFilter( true ); globals->get_aircraft_model()->select( true );