summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-02-16 19:09:41 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2007-02-16 19:09:41 +0000
commit54ef4398484f0c11b55d3fa66666b76ebd35ea73 (patch)
tree741107725327fcf515c5455cb2e50b493244b6bd
parentbd56abc3441dfb192b7825a8407411f89827abd1 (diff)
Update VB->Count after clipping.
Don't keep overwriting vertices generated in clipping. We need to keep them around until the primitives are emitted.
-rw-r--r--src/mesa/tnl/t_vb_index.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_vb_index.c b/src/mesa/tnl/t_vb_index.c
index ebaac99f79..240b25fde0 100644
--- a/src/mesa/tnl/t_vb_index.c
+++ b/src/mesa/tnl/t_vb_index.c
@@ -346,8 +346,12 @@ static void polygon( struct idx_context *idx,
#define CTX_ARG struct idx_context *idx
#define GET_REAL_CTX GLcontext *ctx = idx->ctx;
-#define CLIPPED_POLYGON( list, n ) polygon( idx, list, n )
-#define CLIPPED_LINE( a, b ) line( idx, a, b )
+#define CLIPPED_POLYGON( list, n ) \
+do { polygon( idx, list, n ); VB->Count = newvert; } while (0)
+
+#define CLIPPED_LINE( a, b ) \
+do { line( idx, a, b ); VB->Count = newvert; } while (0)
+
#define W(i) coord[i][3]
#define Z(i) coord[i][2]