From feb722fa98f04a4487b7ec4746bcc8c7296899c8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 5 Jun 2008 12:01:00 -0600 Subject: [PATCH] mesa: added _mesa_DrawArrays, DrawElements, DrawRangeElements() wrappers for VBO funcs --- src/mesa/main/varray.h | 14 ++++++++++++++ src/mesa/vbo/vbo_exec_array.c | 27 +++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h index 3589735..ba91ecf 100644 --- a/src/mesa/main/varray.h +++ b/src/mesa/main/varray.h @@ -147,6 +147,20 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count, GLsizei primcount, GLint modestride ); + +extern void GLAPIENTRY +_mesa_DrawArrays(GLenum mode, GLint first, GLsizei count); + +extern void GLAPIENTRY +_mesa_DrawElements(GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices); + +extern void GLAPIENTRY +_mesa_DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, + GLenum type, const GLvoid *indices); + + + extern void _mesa_init_varray( GLcontext * ctx ); diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index dbee218..e3d2fc5 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -30,6 +30,7 @@ #include "main/state.h" #include "main/api_validate.h" #include "main/api_noop.h" +#include "main/varray.h" #include "glapi/dispatch.h" #include "vbo_context.h" @@ -400,3 +401,29 @@ void vbo_exec_array_destroy( struct vbo_exec_context *exec ) { /* nothing to do */ } + + +/* This API entrypoint is not ordinarily used */ +void GLAPIENTRY +_mesa_DrawArrays(GLenum mode, GLint first, GLsizei count) +{ + vbo_exec_DrawArrays(mode, first, count); +} + + +/* This API entrypoint is not ordinarily used */ +void GLAPIENTRY +_mesa_DrawElements(GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices) +{ + vbo_exec_DrawElements(mode, count, type, indices); +} + + +/* This API entrypoint is not ordinarily used */ +void GLAPIENTRY +_mesa_DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, + GLenum type, const GLvoid *indices) +{ + vbo_exec_DrawRangeElements(mode, start, end, count, type, indices); +} -- 2.7.4