(data, onset=0, index=False)
Update data in the currently bound buffer.
Update data in the currently bound buffer.
Update data in the currently bound buffer .
def update(data, onset=0, index=False):
        """Update data in the currently bound buffer."""
        gltype = Attribute.get_gltype(index)
        data = Attribute.convert_data(data, index=index)
        # convert onset into bytes count
        if data.ndim == 1:
            ndim = 1
        elif data.ndim == 2:
            ndim = data.shape[1]
        onset *= ndim * data.itemsize
        gl.glBufferSubData(gltype, int(onset), data)
def update ( data , onset = 0 , index = False ) : gltype = Attribute . get_gltype ( index ) data = Attribute . convert_data ( data , index = index ) # convert onset into bytes count if data . ndim == 1 : ndim = 1 elif data . ndim == 2 : ndim = data . shape [ 1 ] onset *= ndim * data . itemsize gl . glBufferSubData ( gltype , int ( onset ) , data )