]> git.mxchange.org Git - flightgear.git/commitdiff
If the (temporary) property /cockpit is true, set the near clipping
authordavid <david>
Wed, 6 Mar 2002 16:01:19 +0000 (16:01 +0000)
committerdavid <david>
Wed, 6 Mar 2002 16:01:19 +0000 (16:01 +0000)
plane to 0.2; otherwise, use the old defaults.

This is a temporary step that will allow me to work on a 3D cockpit
without breaking current behaviour; the final approach will be to put
the 3D model in its own scene graph, with different clipping plane.

src/Main/main.cxx

index 4d8d1243ea03b8bfdbc5565382381082c51fb9c1..e2372561e49773916122c49c94ff62c6fa965ba9 100644 (file)
@@ -664,11 +664,12 @@ void fgRenderFrame( void ) {
        double agl = current_aircraft.fdm_state->get_Altitude() * SG_FEET_TO_METER
            - scenery.get_cur_elev();
 
-       if ( agl > 10.0 ) {
+       if (fgGetBool("/cockpit"))
+         ssgSetNearFar( 0.2f, 120000.0f );
+       else if ( agl > 10.0)
            ssgSetNearFar( 10.0f, 120000.0f );
-       } else {
+       else
            ssgSetNearFar( 0.5f, 120000.0f );
-       }
 
        current_model.update(0); // FIXME: use real delta time