diff options
author | Brian Paul <[email protected]> | 2009-08-06 13:53:06 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-08-07 09:50:38 -0600 |
commit | b28854088bb6a6fa1a12f47056d9aee2fbdefc70 (patch) | |
tree | bf38612de7214571845990b98d59907b6ddd16e1 /src/mesa | |
parent | 692c50b38806b81cb576d11b6d79dd0a917e58f9 (diff) |
mesa: new _mesa_copy_client_array() function
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/varray.c | 23 | ||||
-rw-r--r-- | 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 88bf8d8d350..be1c03cec2a 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 d4d505ae049..becc67c29d3 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 |