Handbook
Glossary
read-buffer ( buffer-ptr: buffer-ptr size: integer -- data: byte-array )
GPU-accelerated rendering
ยป
Buffer objects
Prev:
update-buffer ( buffer-ptr: buffer-ptr size: integer data -- )
Next:
copy-buffer ( to-buffer-ptr: buffer-ptr from-buffer-ptr: buffer-ptr size: integer -- )
Vocabulary
gpu
.
buffers
Inputs
buffer-ptr
a
buffer-ptr
size
an
integer
Outputs
data
a
byte-array
Word description
Reads
size
bytes from
buffer
into a new
byte-array
.
See also
allocate-buffer
,
allocate-byte-array
,
buffer-size
,
update-buffer
,
copy-buffer
,
with-mapped-buffer
Definition
USING:
accessors
byte-arrays
gpu.buffers.private
opengl.gl
typed
;
IN:
gpu.buffers
TYPED::
read-buffer
( buffer-ptr: buffer-ptr size: integer -- data: byte-array )
buffer-ptr
buffer>>
:>
buffer buffer
bind-buffer
:>
target
size
<byte-array>
:>
data target buffer-ptr
offset>>
size
data
glGetBufferSubData
data
;