Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

TextureLayered

Inherits: Texture < Resource < RefCounted < Object

Inherited By: CompressedTextureLayered, ImageTextureLayered, PlaceholderTextureLayered, TextureLayeredRD

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

Description

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

Format

_get_format ( ) virtual const

int

_get_height ( ) virtual const

Image

_get_layer_data ( int layer_index ) virtual const

int

_get_layered_type ( ) virtual const

int

_get_layers ( ) virtual const

int

_get_width ( ) virtual const

bool

_has_mipmaps ( ) virtual const

Format

get_format ( ) const

int

get_height ( ) const

Image

get_layer_data ( int layer ) const

LayeredType

get_layer