Ensure that the aircraft model is in the same clip plane as everything
else and *doesn't* clear the z-buffer when in external view; tighten the far plane for internal view back to 100m to give us maximum precision (this will be important for some instruments; I might even move it to 50m).
This commit is contained in:
parent
6b71800829
commit
d254b2a331
1 changed files with 7 additions and 4 deletions
|
@ -32,7 +32,7 @@ FGAircraftModel::FGAircraftModel ()
|
|||
: _aircraft(0),
|
||||
_scene(new ssgRoot),
|
||||
_nearplane(0.01f),
|
||||
_farplane(5000.0f)
|
||||
_farplane(100.0f)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -89,10 +89,13 @@ FGAircraftModel::draw ()
|
|||
// OK, now adjust the clip planes and draw
|
||||
// FIXME: view number shouldn't be
|
||||
// hard-coded.
|
||||
int view_number = globals->get_viewmgr()->get_current();
|
||||
if (_aircraft->getVisible()) {
|
||||
glClearDepth(1);
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
ssgSetNearFar(_nearplane, _farplane);
|
||||
if (view_number == 0) {
|
||||
glClearDepth(1);
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
ssgSetNearFar(_nearplane, _farplane);
|
||||
}
|
||||
ssgCullAndDraw(_scene);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue