Handbook
Glossary
allocate-byte-array ( buffer byte-array -- )
GPU-accelerated rendering
ยป
Buffer objects
Prev:
allocate-buffer ( buffer size initial-data -- )
Next:
grow-buffer ( buffer: buffer target-size: integer -- )
Vocabulary
gpu
.
buffers
Inputs
buffer
a
buffer
byte-array
a
byte-array
Outputs
None
Word description
Discards any memory currently held by
buffer
and reallocates a new memory block large enough to store
byte-array
. The contents of
byte-array
are then copied into the buffer.
See also
allocate-buffer
,
buffer-size
,
update-buffer
,
read-buffer
,
copy-buffer
,
with-mapped-buffer
Definition
USING:
alien
kernel
;
IN:
gpu.buffers
:
allocate-byte-array
( buffer byte-array -- )
[
byte-length
]
[
]
bi
allocate-buffer
;
inline