> # NAME

> cgSetBufferSubData - partially update a Cg buffer object

> # SYNOPSIS

>       #include <Cg/cg.h>

>       void cgSetBufferSubData( CGbuffer buffer,
>                                int offset,
>                                int size,
>                                const void * data );

> # PARAMETERS

> buffer

>   Buffer being updated.

> offset

>   Buffer offset in bytes of the beginning of the partial update.

> size

>   Number of buffer bytes to be updated. Zero means no update.

> data

>   Pointer to the start of the data being copied into the buffer.

> # RETURN VALUES

> None.

> # DESCRIPTION

> cgSetBufferSubData resizes and partially updates an existing buffer object.

> A buffer which has been mapped into an applications address space with cgMapBuffer must be unmapped using cgUnmapBuffer before it can be updated with cgSetBufferSubData.

> # EXAMPLES

> cgSetBufferSubData( myBuffer, 16, sizeof( myData ), myData );

> # ERRORS

> CG_INVALID_BUFFER_HANDLE_ERROR is generated if buffer is not a valid buffer.

> CG_BUFFER_UPDATE_NOT_ALLOWED_ERROR is generated if buffer is currently mapped.

> CG_BUFFER_INDEX_OUT_OF_RANGE_ERROR is generated if offset or size is out of range.

> # HISTORY

> cgSetBufferSubData was introduced in Cg 2.0.

> # SEE ALSO

> cgCreateBuffer, cgGLCreateBuffer, cgSetBufferData, cgMapBuffer, cgUnmapBuffer