David Megginson <[EMAIL PROTECTED]> said: > Jim Wilson writes: > > > This makes sense. Also I've found other reasons to not apply that > > patch. The 3d model ends up disappearing behind mountains (when it > > should not) if it is rendered without clearing the z-buffer. > > I've just patched FlightGear to put the external plane view in the > same clip plane as the scenery and *not* clear the z-buffer in > external view. Granted, I have a GeForce2Go, but I was able to taxi > the plane immediately behind a hangar and immediately in front of one > and see the right thing both times from a tower view a couple of > kilometers away. >
Well for the 16bit cards we need to clear the z-buffer even if we do not set a different near/far. I tested this pretty rigorously last night. And with the patch this morning a myriad of depth buffer problems are appearing. They all go away when the buffer is cleared. This is what we should have for now: if (view_number == 0) { glClearDepth(1); glClear(GL_DEPTH_BUFFER_BIT); ssgSetNearFar(_nearplane, _farplane); + } else { + glClearDepth(1); + glClear(GL_DEPTH_BUFFER_BIT); } ssgCullAndDraw(_scene); } I'd speculate (haven't tried it) that this problem would go a way if we put the externally viewed models into the main scenegraph. If we can't, then when we go to multiple models we'll have to figure out a way of doing only one buffer clear for all the models. Best, Jim _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel