summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c12
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 fed2b6e759..3d09d95851 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.
*