glBufferSubData

updates a subset of a buffer object's data store

Signature

glBufferSubData( GLenum ( target ) , GLintptr ( offset ) , GLsizeiptr ( size ) , const GLvoid * ( data ) )-> void
glBufferSubData( target , offset , size , data )
Copy subset of data into the currently bound vertex-buffer-data object

    target -- the symbolic constant indicating which buffer type is intended
    offset -- offset from beginning of buffer at which to copy bytes
    size -- the count-in-bytes of the array (if an int/long), if None,
        calculate size from data, if an array and data is None, use as
        data (i.e. the parameter can be omitted and calculated)
    data -- data-pointer to be used, may be None to initialize without
        copying over a data-set

    Note that if size is not an int/long it is considered to be data
    *iff* data is None
    

Parameters

VariablesDescription
target
Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER , GL_ATOMIC_COUNTER_BUFFER , GL_COPY_READ_BUFFER , GL_COPY_WRITE_BUFFER , GL_DRAW_INDIRECT_BUFFER , GL_DISPATCH_INDIRECT_BUFFER , GL_ELEMENT_ARRAY_BUFFER , GL_PIXEL_PACK_BUFFER , GL_PIXEL_UNPACK_BUFFER , GL_QUERY_BUFFER , GL_SHADER_STORAGE_BUFFER , GL_TEXTURE_BUFFER , GL_TRANSFORM_FEEDBACK_BUFFER , or GL_UNIFORM_BUFFER .
offset
Specifies the offset into the buffer object's data store where data replacement will begin, measured in bytes.
size
Specifies the size in bytes of the data store region being replaced.
data
Specifies a pointer to the new data that will be copied into the data store.

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glBufferSubData
{LGPL} Pyggel pyggel/data.py Lines: 416, 424, 432, 440