Felix Kühling wrote:
Hi,

while working on the savage driver I found two problems. One with
tnl/t_vb_render.c, the other one with tnl_dd/t_dd_tritmp.h. Both started
since I use different hardware primitives for quads and
triangles/polygons.

TAG(quad) in t_dd_tritmp.h calls RASTERIZE( GL_TRIANGLES ) directly
before QUAD( (v[0]), (v[1]), (v[2]), (v[3]) ). RASTERIZE should be
called with GL_QUADS so that the driver selects the correct hardware
primitive. Also I believe that we could use the same condition as in
TAG(triangle), namely

      if (DO_UNFILLED)
         RASTERIZE( GL_QUADS );

This looks ok.


I wonder when this condition will be true anyway. But without this
RASTERIZE is called for every single quad!

The second problem is in t_vb_render.c with clipped primitives. When a
clipped primitive is rendered the PrimitiveNotify callback gets called
with GL_POLYGON. When the next unclipped primitive is drawn we have to
call PrimitiveNotify again with the original primitive type.


I think this is a misunderstanding. Although at a hardware level, you may be rendering with who knows what primitive, at a GL level, you are still attempting to render a TRIANGLE, QUAD, whatever.


The only time a difference between TRIANGLES, QUADS and POLYGONS emerges is if flat shading is active, in which case a different vertex is choosen to provide the color for the whole primitive. Is this the problem you're seeing, or is it something less subtle?

Keith



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to