diff options
author | Brian Paul <[email protected]> | 2003-12-04 03:16:27 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2003-12-04 03:16:27 +0000 |
commit | 03e29a5f77c13b7b888bd8443cb2752850e47d6a (patch) | |
tree | 277c83ddb69e36a166c63c1988988791f95435b3 /src/mesa/main/varray.c | |
parent | 6ff60049a4ab1abac46e5c8e317b0dd842e088c2 (diff) |
Fix some problems with glDrawElements and vertex buffer objects.
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r-- | src/mesa/main/varray.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index ddd04b4c81c..8141cf92817 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -879,12 +879,6 @@ _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]); @@ -906,8 +900,8 @@ _mesa_MultiModeDrawArraysIBM( const GLenum * mode, const GLint * first, for ( i = 0 ; i < primcount ; i++ ) { if ( count[i] > 0 ) { - (ctx->Exec->DrawArrays)( *(GLenum *) ((char *) mode + (i * modestride)), - first[i], count[i] ); + GLenum m = *((GLenum *) ((GLubyte *) mode + i * modestride)); + (ctx->Exec->DrawArrays)( m, first[i], count[i] ); } } } @@ -928,8 +922,8 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count, for ( i = 0 ; i < primcount ; i++ ) { if ( count[i] > 0 ) { - (ctx->Exec->DrawElements)( *(GLenum *) ((char *) mode + (i * modestride)), - count[i], type, indices[i] ); + GLenum m = *((GLenum *) ((GLubyte *) mode + i * modestride)); + (ctx->Exec->DrawElements)( m, count[i], type, indices[i] ); } } } |