diff options
-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 88bf8d8d35..be1c03cec2 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 d4d505ae04..becc67c29d 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 |