Type of a 2D texture array
Module OgamlGraphics.Texture.Texture2DArray
Represents arrays of 2D texturesThis module provides an abstraction of OpenGL 2D texture arrays
Creates a texture array from a list of files, images, or empty layers of given dimensions. Generates all mipmaps by default for every layer by default.
Raises
Also raises
Raises
Texture_error
if the requested size exceeds the maximal texture size allowed by the context.Also raises
Texture_error
if the list of layers is empty, or if all the layers do not have the same dimensions.
Returns the size of a texture array
Sets the minifying filter of a texture. Defaults as LinearMipmapLinear.
Sets the magnifying filter of a texture. Defaults as Linear.
Sets the wrapping function of a texture. Defaults as ClampEdge.
Returns the number of layers of a texture. Equivalent to
(size tex).z
Returns the number of mipmap levels of a texture.
Returns a particular layer of a texture array. Raises
Invalid_argument
if the layer does not exist.
Returns a particular mipmap of a texture array. Raises
Invalid_argument
if the mipmap level does not exist.