Handbook
Glossary
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-ptr
a
buffer-ptr
size
an
integer
data
a
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
USING:
accessors
gpu.buffers.private
opengl.gl
typed
;
IN:
gpu.buffers
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
;