summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-01-22 16:35:50 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-01-22 16:35:50 -0700
commit52264ec53d8d3b20ed7575e2ce09856cb15ab461 (patch)
tree7c29b1e47c25b52787c9a2cebf8803f039333dcc /src/mesa/pipe/draw
parentf1fb69a6e52260193ec16a9820a66e3e4bb03edd (diff)
added stipple_destroy()
Diffstat (limited to 'src/mesa/pipe/draw')
-rw-r--r--src/mesa/pipe/draw/draw_stipple.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mesa/pipe/draw/draw_stipple.c b/src/mesa/pipe/draw/draw_stipple.c
index 6d5226b1b8..3e0d5689e1 100644
--- a/src/mesa/pipe/draw/draw_stipple.c
+++ b/src/mesa/pipe/draw/draw_stipple.c
@@ -152,8 +152,8 @@ stipple_line(struct draw_stage *stage, struct prim_header *header)
/* XXX ToDo: intead of iterating pixel-by-pixel, use a look-up table.
*/
for (i = 0; i < length; i++) {
- int result = stipple_test( stipple->counter+i,
- stipple->pattern, stipple->factor );
+ int result = stipple_test( (int) stipple->counter+i,
+ (ushort) stipple->pattern, stipple->factor );
if (result != state) {
/* changing from "off" to "on" or vice versa */
if (state) {
@@ -164,7 +164,7 @@ stipple_line(struct draw_stage *stage, struct prim_header *header)
}
else {
/* starting an "on" segment */
- start = i;
+ start = (float) i;
}
state = result;
}
@@ -220,6 +220,13 @@ passthrough_tri(struct draw_stage *stage, struct prim_header *header)
}
+static void
+stipple_destroy( struct draw_stage *stage )
+{
+ FREE( stage );
+}
+
+
/**
* Create line stippler stage
*/
@@ -237,6 +244,7 @@ struct draw_stage *draw_stipple_stage( struct draw_context *draw )
stipple->stage.tri = passthrough_tri;
stipple->stage.reset_stipple_counter = reset_stipple_counter;
stipple->stage.end = stipple_end;
+ stipple->stage.destroy = stipple_destroy;
return &stipple->stage;
}