]> git.mxchange.org Git - flightgear.git/commitdiff
Reduce POFF_UNITS from 40 to 4, following Andy Ross's suggestion (to
authordavid <david>
Sat, 16 Nov 2002 22:08:22 +0000 (22:08 +0000)
committerdavid <david>
Sat, 16 Nov 2002 22:08:22 +0000 (22:08 +0000)
avoid having the 2D instruments obscure 3D objects in front of them):

It's related to depth buffer precision.  On my Geforce cards (2MX and
3), it never happens with the 24 bit depth buffer you get by default
at 32bpp.  At 16bpp, it picks a slimmer depth buffer (probably 16 bit)
and the texture layers bleed through.

The code is using a pretty big argument to glPolygonOffset, and I've
never investigated how small it can be.  If someone has a little time
the next time they see this issue, try changing the value of
POFF_UNITS at the top of Cockpit/panel.cxx.  Decrease it until the
textures *just* start to interfere with each other, and post the value
that works for you.

src/Cockpit/panel.cxx

index d2332b9d8fc54e2903a605723163f5b55302fbef..91fa06bda66b9286ba9bc7724b60760d35e4974a 100644 (file)
@@ -52,7 +52,7 @@
 // The number of polygon-offset "units" to place between layers.  In
 // principle, one is supposed to be enough.  In practice, I find that
 // my hardware/driver requires many more.
-#define POFF_UNITS 40
+#define POFF_UNITS 4
 
 \f
 ////////////////////////////////////////////////////////////////////////