From d2afb39d1997e9f2e3c64fc9fa49393e2839d8a1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 17 Sep 2003 18:15:13 +0000 Subject: Implement GL_ELEMENT_ARRAY_BUFFER_ARB for buffer objects. --- src/mesa/main/varray.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mesa/main/varray.c') 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)), -- cgit v1.2.3