summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-03-14 16:13:35 -0600
committerBrian <[email protected]>2008-03-14 16:13:35 -0600
commit5a09ad8248ce452136ed96a3d46532b03c877618 (patch)
tree867a3c25fe90fb65a85d64819e8fcfe0c92aeb24 /src/gallium/auxiliary/draw/draw_context.c
parent344356a0edee932604027386591c82f6666e607c (diff)
gallium: add explicit control for point sprites (convert points to textured quads)
New draw_enable_point_sprites() function. Fixes spriteblast.c demo
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 e8473a4c572..4cca965ac10 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -86,6 +86,7 @@ struct draw_context *draw_create( void )
draw->wide_point_threshold = 1000000.0; /* infinity */
draw->wide_line_threshold = 1.0;
draw->line_stipple = TRUE;
+ draw->point_sprite = TRUE;
draw->reduced_prim = ~0; /* != any of PIPE_PRIM_x */
@@ -267,6 +268,17 @@ draw_enable_line_stipple(struct draw_context *draw, boolean enable)
/**
+ * Tells draw module whether to convert points to quads for sprite mode.
+ */
+void
+draw_enable_point_sprites(struct draw_context *draw, boolean enable)
+{
+ draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
+ draw->point_sprite = enable;
+}
+
+
+/**
* Ask the draw module for the location/slot of the given vertex attribute in
* a post-transformed vertex.
*