update-buffer ( buffer-ptr: buffer-ptr size: integer data -- )
GPU-accelerated rendering ยป Buffer objects

Prev:grow-buffer ( buffer: buffer target-size: integer -- )
Next:read-buffer ( buffer-ptr: buffer-ptr size: integer -- data: byte-array )


Vocabulary
gpu.buffers

Inputs
buffer-ptra buffer-ptr
sizean integer
dataa c-ptr or f


Outputs
None

Word description
Replaces size bytes of data in the buffer referenced by buffer-ptr with data from data.

See also
allocate-buffer, allocate-byte-array, buffer-size, read-buffer, copy-buffer, with-mapped-buffer

Definition


TYPED:: update-buffer
( buffer-ptr: buffer-ptr size: integer data -- )
buffer-ptr buffer>> :> buffer buffer bind-buffer :> target
target buffer-ptr offset>> size data glBufferSubData ;