summaryrefslogtreecommitdiff
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-09-17 18:15:13 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-09-17 18:15:13 +0000
commitd2afb39d1997e9f2e3c64fc9fa49393e2839d8a1 (patch)
treed28d90c58f3ef69237fd2a7e6801b46ab71458ae /src/mesa/main/varray.c
parent1a5709dc5bb5dcb0dbb1b0e6c7b058c7a3039f16 (diff)
Implement GL_ELEMENT_ARRAY_BUFFER_ARB for buffer objects.
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)),