Module: Mesa Branch: master Commit: b28854088bb6a6fa1a12f47056d9aee2fbdefc70 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b28854088bb6a6fa1a12f47056d9aee2fbdefc70
Author: Brian Paul <[email protected]> Date: Thu Aug 6 13:53:06 2009 -0600 mesa: new _mesa_copy_client_array() function --- src/mesa/main/varray.c | 23 +++++++++++++++++++++++ src/mesa/main/varray.h | 6 ++++++ 2 files changed, 29 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 88bf8d8..be1c03c 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -1099,6 +1099,29 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count, /** + * Copy one client vertex array to another. + */ +void +_mesa_copy_client_array(GLcontext *ctx, + struct gl_client_array *dst, + struct gl_client_array *src) +{ + dst->Size = src->Size; + dst->Type = src->Type; + dst->Format = src->Format; + dst->Stride = src->Stride; + dst->StrideB = src->StrideB; + dst->Ptr = src->Ptr; + dst->Enabled = src->Enabled; + dst->Normalized = src->Normalized; + dst->_ElementSize = src->_ElementSize; + _mesa_reference_buffer_object(ctx, &dst->BufferObj, src->BufferObj); + dst->_MaxElement = src->_MaxElement; +} + + + +/** * Print vertex array's fields. */ static void diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h index d4d505a..becc67c 100644 --- a/src/mesa/main/varray.h +++ b/src/mesa/main/varray.h @@ -161,6 +161,12 @@ _mesa_DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, extern void +_mesa_copy_client_array(GLcontext *ctx, + struct gl_client_array *dst, + struct gl_client_array *src); + + +extern void _mesa_print_arrays(GLcontext *ctx); extern void _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
