diff options
author | Keith Whitwell <[email protected]> | 2010-05-14 13:04:42 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2010-05-14 13:04:42 +0100 |
commit | 0bd1cbcd0d28dbadfb0c3e1f8b048a18b56bc72c (patch) | |
tree | b5e83bf73e7fa711579bc3a2e2d0578d3b1c9e11 /src/gallium/auxiliary/draw/draw_pipe_unfilled.c | |
parent | fc4d1b9ba965f26c504e6f5fea12e2bac2d71d72 (diff) |
gallium: convert rasterizer state to use gl-style front/back concepts
Use front/back instead of cw/ccw throughout.
Also, use offset_point/line/fill instead of offset_cw/ccw.
Brings gallium representation of this state into line with its main
user, and also what turns out to be the most common hardware
representation.
This fixes a long-standing bias in the interface towards the
architecture of the software rasterizer.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_unfilled.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_unfilled.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_unfilled.c b/src/gallium/auxiliary/draw/draw_pipe_unfilled.c index a30fada86a0..d1f05129b93 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_unfilled.c +++ b/src/gallium/auxiliary/draw/draw_pipe_unfilled.c @@ -159,9 +159,10 @@ static void unfilled_first_tri( struct draw_stage *stage, struct prim_header *header ) { struct unfilled_stage *unfilled = unfilled_stage(stage); + const struct pipe_rasterizer_state *rast = stage->draw->rasterizer; - unfilled->mode[0] = stage->draw->rasterizer->fill_ccw; /* front */ - unfilled->mode[1] = stage->draw->rasterizer->fill_cw; /* back */ + unfilled->mode[rast->front_ccw ? 0 : 1] = rast->fill_front; + unfilled->mode[rast->front_ccw ? 1 : 0] = rast->fill_back; stage->tri = unfilled_tri; stage->tri( stage, header ); |