diff options
author | Brian <[email protected]> | 2008-03-13 14:33:57 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2008-03-13 14:33:57 -0600 |
commit | 8b8c9acdb747499149e633179a8ad10b0e4206b1 (patch) | |
tree | c630f1b7035a62fef3fc8167baabc97917798105 /src/gallium/auxiliary/draw/draw_context.c | |
parent | b6ed165748c6585f1368be37c0d0289cead419c9 (diff) |
gallium: added draw_enable_line_stipple() function
Allows drivers that implement line stipple to turn off this drawing stage.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_context.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index fed2b6e759a..3d09d958518 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -85,6 +85,7 @@ struct draw_context *draw_create( void ) /* these defaults are oriented toward the needs of softpipe */ draw->wide_point_threshold = 1000000.0; /* infinity */ draw->wide_line_threshold = 1.0; + draw->line_stipple = TRUE; draw->reduced_prim = ~0; /* != any of PIPE_PRIM_x */ @@ -255,6 +256,17 @@ draw_wide_line_threshold(struct draw_context *draw, float threshold) /** + * Tells the draw module whether or not to implement line stipple. + */ +void +draw_enable_line_stipple(struct draw_context *draw, boolean enable) +{ + draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); + draw->line_stipple = enable; +} + + +/** * Ask the draw module for the location/slot of the given vertex attribute in * a post-transformed vertex. * |