Handbook
Glossary
byte-array>buffer ( byte-array upload: buffer-upload-pattern usage: buffer-usage-pattern kind: buffer-kind -- buffer: buffer )
GPU-accelerated rendering
ยป
Buffer objects
Prev:
<buffer> ( upload: buffer-upload-pattern usage: buffer-usage-pattern kind: buffer-kind size: integer initial-data -- buffer: buffer )
Next:
buffer-kind
Vocabulary
gpu
.
buffers
Inputs
byte-array
a
byte-array
upload
a
buffer-upload-pattern
usage
a
buffer-usage-pattern
kind
a
buffer-kind
Outputs
buffer
a
buffer
Word description
Allocates a new
buffer
object with the size and contents of
byte-array
.
upload
,
usage
, and
kind
provide hints to the implementation about the expected usage pattern of the buffer as documented in the
buffer
class documentation.
Definition
USING:
alien
kernel
typed
;
IN:
gpu.buffers
TYPED:
byte-array>buffer
( byte-array upload: buffer-upload-pattern usage: buffer-usage-pattern kind: buffer-kind -- buffer: buffer )
[
]
3curry
dip
[
byte-length
]
[
]
bi
<buffer>
;