Handbook
Glossary
read-texture ( tdt: texture-data-target level: integer -- byte-array: byte-array )
GPU-accelerated rendering
ยป
Texture objects
Prev:
texture-dim ( tdt level -- dim )
Next:
read-texture-to ( tdt: texture-data-target level: integer gpu-data-ptr -- )
Vocabulary
gpu
.
textures
Inputs
tdt
a
texture-data-target
level
an
integer
Outputs
byte-array
a
byte-array
Word description
Reads the entire image for the
level
th level of detail of a texture into a new
byte-array
. The format of the data in the byte array is determined by the
component-order
and
component-type
of the texture.
See also
read-compressed-texture
,
read-compressed-texture-to
,
read-texture-image
,
read-texture-to
Definition
USING:
byte-arrays
kernel
typed
;
IN:
gpu.textures
TYPED:
read-texture
( tdt: texture-data-target level: integer -- byte-array: byte-array )
2dup
texture-data-size
(byte-array)
[
read-texture-to
]
keep
;