Re: [Flightgear-devel] [PATCH] tdfx fog
Melchior FRANZ wrote: 1 would fix my problem. BUT: 40 only breaks the fog in the scenery, while it works well for the instruments. So I suggest to let POFF_UNITS be 40 but to reset the PolygonOffset to -1 or zero after having drawn the instruments. This should also work for all other cards. (Please verify and apply!) Is this not done already? I'm pretty sure that I reset the offset at the end of panel rendering. If I didn't, then this is quite obviously a bug. Andy -- Andrew J. RossNextBus Information Systems Senior Software Engineer Emeryville, CA [EMAIL PROTECTED] http://www.nextbus.com Men go crazy in conflagrations. They only get better one by one. - Sting (misquoted) ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
[Flightgear-devel] Re: [PATCH] tdfx fog
* Andy Ross -- Tuesday 23 July 2002 21:21: Melchior FRANZ wrote: So I suggest to let POFF_UNITS be 40 but to reset the PolygonOffset to -1 or zero after having drawn the instruments. This should also work for all other cards. (Please verify and apply!) Is this not done already? I'm pretty sure that I reset the offset at the end of panel rendering. If I didn't, then this is quite obviously a bug. No, it isn't reset. And my patch fixes this bug. :-) m. ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
RE: [Flightgear-devel] [PATCH] tdfx fog
Melchior FRANZ writes: Here's why my tdfx v3 doesn't show fog any more[1]: it's the glPolygonOffset() in the 3D-panel code. And I remembered that Andy had commented on this problem a while back in the already mentioned thread ... snip Index: panel.cxx === RCS file: /var/cvs/FlightGear-0.7/FlightGear/src/Cockpit/panel.cxx,v retrieving revision 1.75 diff -u -3 -p -r1.75 panel.cxx --- panel.cxx 22 Jul 2002 19:09:42 - 1.75 +++ panel.cxx 23 Jul 2002 18:59:07 - @@ -423,6 +423,7 @@ FGPanel::draw() // restore some original state glPopAttrib(); + glPolygonOffset(0, 0); glDisable(GL_POLYGON_OFFSET_FILL); } Does this slightly different code work for you void FGPanel::draw() { // In 3D mode, it's possible that we are being drawn exactly on top // of an existing polygon. Use an offset to prevent z-fighting. In // 2D mode, this is a no-op. glPushAttrib( GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT | GL_POLYGON_BIT | GL_LIGHTING_BIT | GL_TEXTURE_BIT | GL_PIXEL_MODE_BIT ); .. // glDisable(GL_POLYGON_OFFSET_FILL); glPopAttrib() ; } ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel