aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-04-04 17:02:20 +0100
committerKeith Whitwell <[email protected]>2008-04-04 17:05:27 +0100
commit84501e68f6294370d6f2f6aec4e7eab57bcc0e72 (patch)
tree3b4cb6e98d90468f5a5863b9672a9b9f84f35a4b /src/gallium/auxiliary/draw/draw_context.c
parent1d6877b32642d718fb7b29eca647f4d1dd0f99bb (diff)
gallium: Handle client-supplied edgeflags.
Also, implement support in the draw module. We were hardwiring these to one for quite a long time... Currently using a draw_set_edgeflags() function, may be better to push the argument into the draw_arrays() function. TBD.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 470c1c571b4..b3c65c90d67 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -444,3 +444,19 @@ void draw_set_render( struct draw_context *draw,
{
draw->render = render;
}
+
+void draw_set_edgeflags( struct draw_context *draw,
+ const unsigned *edgeflag )
+{
+ draw->user.edgeflag = edgeflag;
+}
+
+
+boolean draw_get_edgeflag( struct draw_context *draw,
+ unsigned idx )
+{
+ if (draw->user.edgeflag)
+ return (draw->user.edgeflag[idx/32] & (1 << (idx%32))) != 0;
+ else
+ return 1;
+}