diff options
author | Brian Paul <[email protected]> | 2010-02-15 08:57:17 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-02-15 08:57:17 -0700 |
commit | 36a54885a4b2eb2b23361f2add3d66e385a322cf (patch) | |
tree | 659ebdde1080fd7674b32b7d82d0634bf43ef876 /src/mesa | |
parent | e045af41469f2e2b512fc748cbad841774a39905 (diff) |
vbo: fix broken glMultiDrawElements()
Seems to be a regression from commit 60b08eb1fdf287d28ec66b9282513ab35a61aee0.
(cherry picked from commit c5a4cfb03ff17955c049f16ac805f5837ea4b633)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/vbo/vbo_exec_array.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 88502f3d355..a284e4047f3 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -935,13 +935,13 @@ vbo_validated_multidrawelements(GLcontext *ctx, GLenum mode, vbo->draw_prims(ctx, exec->array.inputs, prim, primcount, &ib, GL_FALSE, ~0, ~0); } else { + /* render one prim at a time */ for (i = 0; i < primcount; i++) { ib.count = count[i]; ib.type = type; ib.obj = ctx->Array.ElementArrayBufferObj; ib.ptr = indices[i]; - prim[0].begin = 1; prim[0].end = 1; prim[0].weak = 0; @@ -954,11 +954,12 @@ vbo_validated_multidrawelements(GLcontext *ctx, GLenum mode, prim[0].basevertex = basevertex[i]; else prim[0].basevertex = 0; - } - vbo->draw_prims(ctx, exec->array.inputs, prim, 1, &ib, - GL_FALSE, ~0, ~0); + vbo->draw_prims(ctx, exec->array.inputs, prim, 1, &ib, + GL_FALSE, ~0, ~0); + } } + _mesa_free(prim); } |