diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2003-04-10 10:03:45 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2003-04-10 10:03:45 +0000 |
commit | afb0b6b67993ce8024355ddb1a62287136357f76 (patch) | |
tree | ec346dcffafee0c4dcc8c4524ebfc42707d63fdd | |
parent | 71c4acf14f521dafe8746d54dd03406de3723b13 (diff) |
drawarrayrange fix
-rw-r--r-- | src/mesa/tnl/t_array_api.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/tnl/t_array_api.c b/src/mesa/tnl/t_array_api.c index 60744a2d7c..1a5d78db15 100644 --- a/src/mesa/tnl/t_array_api.c +++ b/src/mesa/tnl/t_array_api.c @@ -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; } |