diff options
author | Keith Whitwell <[email protected]> | 2003-04-10 10:03:30 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2003-04-10 10:03:30 +0000 |
commit | bf7128a682fad669aa215d7fadd9b50a6de49a32 (patch) | |
tree | 3c9dfcfa0b734d6942ce4b954d117ca4d788d1ed | |
parent | ebab631c9c4c50fb2510ecc4f8ce3d7148355d92 (diff) |
drawarrayrange fix
-rw-r--r-- | src/mesa/tnl/t_array_api.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/tnl/t_array_api.c b/src/mesa/tnl/t_array_api.c index 19cb19b716d..76fc607842e 100644 --- a/src/mesa/tnl/t_array_api.c +++ b/src/mesa/tnl/t_array_api.c @@ -1,4 +1,4 @@ -/* $Id: t_array_api.c,v 1.31 2003/03/01 01:50:26 brianp Exp $ */ +/* $Id: t_array_api.c,v 1.32 2003/04/10 10:03:30 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -77,6 +77,7 @@ static void _tnl_draw_range_elements( GLcontext *ctx, GLenum mode, { TNLcontext *tnl = TNL_CONTEXT(ctx); + int i; FLUSH_CURRENT( ctx, 0 ); /* _mesa_debug(ctx, "%s\n", __FUNCTION__); */ @@ -90,6 +91,9 @@ static void _tnl_draw_range_elements( GLcontext *ctx, GLenum mode, tnl->vb.PrimitiveLength[0] = count; tnl->vb.Elts = (GLuint *)indices; + for (i = 0 ; i < count ; i++) + indices[i] -= start; + if (ctx->Array.LockCount) tnl->Driver.RunPipeline( ctx ); else { @@ -99,6 +103,9 @@ static void _tnl_draw_range_elements( GLcontext *ctx, GLenum mode, tnl->Driver.RunPipeline( ctx ); tnl->pipeline.run_input_changes |= ctx->Array._Enabled; } + + for (i = 0 ; i < count ; i++) + indices[i] += start; } |