summaryrefslogtreecommitdiff
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r--src/mesa/main/varray.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 822935b765..973541b87e 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -924,6 +924,12 @@ _mesa_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type,
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ if (ctx->Array.ElementArrayBufferObj->Name) {
+ /* use indices in the buffer object */
+ ASSERT(ctx->Array.ElementArrayBufferObj->Data);
+ indices = (const GLvoid **) ctx->Array.ElementArrayBufferObj->Data;
+ }
+
for (i = 0; i < primcount; i++) {
if (count[i] > 0) {
(ctx->Exec->DrawElements)(mode, count[i], type, indices[i]);
@@ -963,6 +969,8 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count,
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ /* XXX not sure about ARB_vertex_buffer_object handling here */
+
for ( i = 0 ; i < primcount ; i++ ) {
if ( count[i] > 0 ) {
(ctx->Exec->DrawElements)( *(GLenum *) ((char *) mode + (i * modestride)),