Table of Contents

Class TextureLayered

Base class for texture types which contain the data of multiple Images. Each image is of the same size and format.

Inheritance
TextureLayered
Derived

Remarks

Base class for ImageTextureLayered and CompressedTextureLayered. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also Texture3D.

Data is set on a per-layer basis. For Texture2DArrays, the layer specifies the array layer.

All images need to have the same width, height and number of mipmap levels.

A TextureLayered can be loaded with ResourceLoader.load.

Internally, Godot maps these files to their respective counterparts in the target rendering driver (Vulkan, OpenGL3).

Methods

_get_format

Qualifiers: virtualconst

Called when the TextureLayered's format is queried.

int _get_format

_get_height

Qualifiers: virtualconst

Called when the TextureLayered's height is queried.

int _get_height

_get_layer_data(int)

Qualifiers: virtualconst

Called when the data for a layer in the TextureLayered is queried.

Image _get_layer_data(int layer_index)

Parameters

layer_index int

_get_layered_type

Qualifiers: virtualconst

Called when the layers' type in the TextureLayered is queried.

int _get_layered_type

_get_layers

Qualifiers: virtualconst

Called when the number of layers in the TextureLayered is queried.

int _get_layers

_get_width

Qualifiers: virtualconst

Called when the TextureLayered's width queried.

int _get_width

_has_mipmaps

Qualifiers: virtualconst

Called when the presence of mipmaps in the TextureLayered is queried.

bool _has_mipmaps

get_format

Qualifiers: const

Returns the current format being used by this texture. See Format for details.

int get_format

get_height

Qualifiers: const

Returns the height of the texture in pixels. Height is typically represented by the Y axis.

int get_height

get_layer_data(int)

Qualifiers: const

Returns an Image resource with the data from specified layer.

Image get_layer_data(int layer)

Parameters

layer int

get_layered_type

Qualifiers: const

Returns the TextureLayered's type. The type determines how the data is accessed, with cubemaps having special types.

int get_layered_type

get_layers

Qualifiers: const

Returns the number of referenced Images.

int get_layers

get_width

Qualifiers: const

Returns the width of the texture in pixels. Width is typically represented by the X axis.

int get_width

has_mipmaps

Qualifiers: const

Returns true if the layers have generated mipmaps.

bool has_mipmaps