GL_APICALL void GL_APIENTRY glBufferSubData(
GLenum target,
GLintptr offset,
GLsizeiptr size,
const void * data
);
| Name | Description | |
|---|---|---|
| in | target | Target |
| in | offset | Offset (in bytes) to the partial region |
| in | size | Size of the partial region |
| in | data | Pointer to the vertex data |
Updates a partial vertex data region in the current vertex buffer object.
Set target equal to GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
Set offset to the offset of the partial region to update.
Set size to the size of the partial region.
Set data to a pointer to the data to update.
The partial region is transferred using the method configured by a previous call to glBufferData. You must call glBufferData to allocate a vertex buffer region before you call this function. A GL_INVALID_OPERATION error occurs when you call glBufferSubData without first calling glBufferData.
Calls to this function are ignored when size is 0.
This function generates the following errors.
| GL_INVALID_VALUE | The offset or size argument is negative; the sum of offset and size exceeds the size of the original buffer; or data is NULL. |
|---|---|
| GL_INVALID_OPERATION | This function was called without any command-list objects bound. |
| GL_INVALID_OPERATION | A previous call to glBufferData set the transfer method to (NN_GX_MEM_FCRAM | GL_NO_COPY_FCRAM_DMP). |
| GL_INVALID_OPERATION | Object 0 is bound to the current target. |
| GL_INVALID_OPERATION | The glBufferSubData function was called without first calling glBufferData. |
CONFIDENTIAL