Texture objects
GPU-accelerated rendering

Prev:Buffer objects
Next:Framebuffer objects


The gpu.textures vocabulary provides words for creating, allocating, updating, and reading GPU texture objects.
texture

texture-data

allocate-texture ( tdt level dim data -- )

update-texture ( tdt level loc dim data -- )

texture-dim ( tdt level -- dim )

read-texture ( tdt: texture-data-target level: integer -- byte-array: byte-array )

read-texture-to ( tdt: texture-data-target level: integer gpu-data-ptr -- )


Words are also provided to use image objects from the images library as data sources and destinations for texture data:
allocate-texture-image ( tdt level image -- )

update-texture-image ( tdt level loc image -- )

read-texture-image ( tdt level -- image )


Compressed texture data can also be supplied and read:
compressed-texture-format

compressed-texture-data

allocate-compressed-texture ( tdt level dim compressed-data -- )

update-compressed-texture ( tdt level loc dim compressed-data -- )

compressed-texture-data-size ( tdt level -- size )

read-compressed-texture ( tdt: texture-data-target level: integer -- byte-array: byte-array )

read-compressed-texture-to ( tdt: texture-data-target level: integer gpu-data-ptr -- )