I wrote: > I can confirm this. Layers on the 2D panels (but oddly, only the 2D > panels) aren't drawing over the background with the current ATI > drivers.
OK, this turns out to be a trivial fix, although I still think it's a driver bug. There are two calls to glPolygonOffset in the panel rendering code (shared by both 2D and 3D panels). One is called per-layer, and sets up a layer-specific offset. The other is called for drawing the background textures, to lift them off of any underlying cockpit geometry. I was using different "factor" values for each, incorrectly. Patch attached. It was affecting only 2D panels because the 3D ones don't use background images. Problem is, by my reading of the specification the bug should have had the effect of pushing the background texture *farther* behind the instruments, instead of pulling it on top of them. Either I'm reading the spec incorrectly or ATI has inverted the sense of the factor argument. Dunno, I'll submit a bug report to them and see what happens. Andy RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Cockpit/panel.cxx,v retrieving revision 1.6 diff -u -r1.6 panel.cxx --- src/Cockpit/panel.cxx 17 Nov 2002 00:04:57 -0000 1.6 +++ src/Cockpit/panel.cxx 1 Dec 2002 22:23:42 -0000 @@ -370,7 +370,7 @@ // of an existing polygon. Use an offset to prevent z-fighting. In // 2D mode, this is a no-op. glEnable(GL_POLYGON_OFFSET_FILL); - glPolygonOffset(0, -POFF_UNITS); + glPolygonOffset(-1, -POFF_UNITS); // save some state glPushAttrib( GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT | GL_LIGHTING_BIT -- Andrew J. Ross NextBus 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