allocate-texture ( tdt level dim data -- )
GPU-accelerated rendering ยป Texture objects

Prev:texture-data
Next:update-texture ( tdt level loc dim data -- )


Vocabulary
gpu.textures

Inputs
tdta texture-data-target
levelan integer
diman integer or sequence of integers
dataa texture-data or f


Outputs
None

Word description
Allocates a new block of GPU memory for the levelth level of detail of a texture-data-target. If data is not f, the new data is initialized from the given texture-data object; otherwise, the new image is left uninitialized.

Notes
Using a buffer-ptr as the ptr of a texture-data object requires OpenGL 2.1 or later or the GL_ARB_pixel_buffer_object extension.

See also
allocate-compressed-texture, allocate-texture-image

Definition

GENERIC#: allocate-texture 3 ( tdt level dim data -- )


Methods