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 -0000      1.75
>+++ panel.cxx   23 Jul 2002 18:59:07 -0000
>@@ -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

Reply via email to