On Tue, 16 Jul 2002, José Fonseca wrote: > On Tue, Jul 16, 2002 at 11:54:02AM -0400, Leif Delgass wrote: > > On Wed, 10 Jul 2002, Allen Barnett wrote: > > > > > 2. clipping.c: In this program, a cube is drawn using a flat shaded quad > > > strip with different colors for each pair of vertices. If a face of the cube > > > is clipped by an edge of the X window, then the triangles which the quad is > > > decomposed into are not drawn in the correct color. You can rotate the cube > > > around with the left mouse button to see the effect on different faces. You > > > can zoom in and out with the middle mouse button. Once the cube is entirely > > > inside the window, it is drawn properly. I think this may be related to a > > > problem mentioned on Leif's status page. (It works OK with Mesa, with > > > indirect rendering and with the TDFX driver.) > > > > I fixed this by having Mesa copy the provoking-vertex color into all > > vertices (by telling the template we don't have hardware flat-shading). > > The mach64 uses a fixed vertex number for flatshading, and we implement > > all primitives as triangles, reusing vertices where possible. Perhaps > > there is a way to order the vertices to get flat-shading to work without > > copying colors, > > It's probably worth to check it out, to avoid all the copying > restoring that happens with this.
Well, it's not high on my list. I don't think flat-shading is used that often, and the changes don't have any effect on smooth shading. Actually, it _eliminates_ some saves/restores necessary for unfilled polygons with hardware flat-shading. Actually, I think the problem is larger than mach64. Rage128 has the same problem and it appears to have GL compliant flat-shading based on the primitive. The problem is that for clipped polygons, the primitive type changes, so flat-shading breaks down in that case (like with unfilled polygons). I think the templates would have to be changed to copy the provoking-vertex color of the polygon being clipped into the vertices of the triangles generated by clipping, rather than interpolating the color. -- Leif Delgass http://www.retinalburn.net ------------------------------------------------------- This sf.net email is sponsored by: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in! http://www.jabber.com/osdn/xim _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel