Vocabulary
gpu.textures

Inputs
tdta texture-data-target
levelan integer


Outputs
byte-arraya 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


TYPED: read-texture
( tdt: texture-data-target level: integer -- byte-array: byte-array )
2dup texture-data-size (byte-array) [ read-texture-to ] keep
;