Set near clip plane to 0.5 meters when close to the ground. Also, let the view get a bit closer to the ground before hitting the hard limit.
This commit is contained in:
parent
3786e0665c
commit
009c34bd23
2 changed files with 9 additions and 3 deletions
|
@ -202,7 +202,7 @@ static void fgUpdateViewParams( void ) {
|
|||
if ( FG_Altitude * FEET_TO_METER - scenery.cur_elev > 10.0 ) {
|
||||
gluPerspective(current_options.get_fov(), v->win_ratio, 10.0, 100000.0);
|
||||
} else {
|
||||
gluPerspective(current_options.get_fov(), v->win_ratio, 1.0, 100000.0);
|
||||
gluPerspective(current_options.get_fov(), v->win_ratio, 0.5, 100000.0);
|
||||
// printf("Near ground, minimizing near clip plane\n");
|
||||
}
|
||||
// }
|
||||
|
@ -924,6 +924,9 @@ int main( int argc, char **argv ) {
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.40 1998/07/24 21:56:59 curt
|
||||
// Set near clip plane to 0.5 meters when close to the ground. Also, let the view get a bit closer to the ground before hitting the hard limit.
|
||||
//
|
||||
// Revision 1.39 1998/07/24 21:39:08 curt
|
||||
// Debugging output tweaks.
|
||||
// Cast glGetString to (char *) to avoid compiler errors.
|
||||
|
|
|
@ -123,10 +123,10 @@ void fgVIEW::Update( fgFLIGHT *f ) {
|
|||
// p.lon & p.lat are already defined earlier, p.radius was set to
|
||||
// the sea level radius, so now we add in our altitude.
|
||||
if ( FG_Altitude * FEET_TO_METER >
|
||||
(scenery.cur_elev + 3.758099 * METER_TO_FEET) ) {
|
||||
(scenery.cur_elev + 0.5 * METER_TO_FEET) ) {
|
||||
p.radius += FG_Altitude * FEET_TO_METER;
|
||||
} else {
|
||||
p.radius += scenery.cur_elev + 3.758099 * METER_TO_FEET;
|
||||
p.radius += scenery.cur_elev + 0.5 * METER_TO_FEET;
|
||||
}
|
||||
|
||||
abs_view_pos = fgPolarToCart3d(p);
|
||||
|
@ -470,6 +470,9 @@ void fg_gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.18 1998/07/24 21:57:02 curt
|
||||
// Set near clip plane to 0.5 meters when close to the ground. Also, let the view get a bit closer to the ground before hitting the hard limit.
|
||||
//
|
||||
// Revision 1.17 1998/07/24 21:39:12 curt
|
||||
// Debugging output tweaks.
|
||||
// Cast glGetString to (char *) to avoid compiler errors.
|
||||
|
|
Loading…
Add table
Reference in a new issue