cgSetBufferData(3)

NAME
cgSetBufferData - resize and completely update a buffer object

SYNOPSIS
  #include <Cg/cg.h>
  void cgSetBufferData( CGbuffer buffer,
                        int size,
                        const void * data );

PARAMETERS
The buffer which will be updated. Specifies a new size for the buffer object. Zero for size means use the existing size of the buffer as the effective size. Pointer to the data to copy into the buffer. The number of bytes to copy is determined by the size parameter.

RETURN VALUES
None.

DESCRIPTION
cgSetBufferData resizes and completely 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 cgSetBufferData.

EXAMPLES
cgSetBufferData( myBuffer, 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.

HISTORY
cgSetBufferData was introduced in Cg 2.0.

SEE ALSO
cgCreateBuffer, cgGLCreateBuffer, cgSetBufferSubData, cgMapBuffer, cgUnmapBuffer