diff options
author | Ian Romanick <[email protected]> | 2003-08-22 23:28:03 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2003-08-22 23:28:03 +0000 |
commit | 3baefe663bb15b4fd60921155de38c12ec2758c4 (patch) | |
tree | 8326c63a644be8819990c041a912c117d68500d4 /src/mesa/main/varray.c | |
parent | 5df82c82bd53db90eb72c5aad4dd20cf6f1116b1 (diff) |
Added support for GL_IBM_multimode_draw_arrays.
Added non-static entrypoints and the name string for
GL_SUN_multi_draw_arrays (identical to GL_EXT_multi_draw_arrays).
Made add_newer_entrypoints (in src/mesa/main/context.c) table driven.
This reduced the size of context.o by about 3KB.
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r-- | src/mesa/main/varray.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 07b341e68af..14f609d31dd 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -913,6 +913,46 @@ _mesa_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type, } +/* GL_IBM_multimode_draw_arrays */ +void +_mesa_MultiModeDrawArraysIBM( const GLenum * mode, const GLint * first, + const GLsizei * count, + GLsizei primcount, GLint modestride ) +{ + GET_CURRENT_CONTEXT(ctx); + GLint i; + + ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + + for ( i = 0 ; i < primcount ; i++ ) { + if ( count[i] > 0 ) { + (ctx->Exec->DrawArrays)( *(GLenum *) ((char *) mode + (i * modestride)), + first[i], count[i] ); + } + } +} + + +/* GL_IBM_multimode_draw_arrays */ +void +_mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count, + GLenum type, const GLvoid * const * indices, + GLsizei primcount, GLint modestride ) +{ + GET_CURRENT_CONTEXT(ctx); + GLint i; + + ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + + for ( i = 0 ; i < primcount ; i++ ) { + if ( count[i] > 0 ) { + (ctx->Exec->DrawElements)( *(GLenum *) ((char *) mode + (i * modestride)), + count[i], type, indices[i] ); + } + } +} + + /**********************************************************************/ /***** Initialization *****/ /**********************************************************************/ |