Class reference

Texture3D

Inherits Texture

Base class for 3-dimensional textures.

Description

Base class for ImageTexture3D and CompressedTexture3D. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. Texture3D is the base class for all 3-dimensional texture types. See also TextureLayered. All images need to have the same width, height and number of mipmap levels. To create such a texture file yourself, reimport your image files using the Redot Editor import presets.

Methods

Image[] _get_data() virtual required const

Called when the Texture3D's data is queried.

int _get_depth() virtual required const

Called when the Texture3D's depth is queried.

int _get_format() virtual required const

Called when the Texture3D's format is queried.

int _get_height() virtual required const

Called when the Texture3D's height is queried.

int _get_width() virtual required const

Called when the Texture3D's width is queried.

bool _has_mipmaps() virtual required const

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

Image[] get_data() const

Returns the Texture3D's data as an array of Images. Each Image represents a slice of the Texture3D, with different slices mapping to different depth (Z axis) levels.

int get_depth() const

Returns the Texture3D's depth in pixels. Depth is typically represented by the Z axis (a dimension not present in Texture2D).

int get_format() const

Returns the current format being used by this texture.

int get_height() const

Returns the Texture3D's height in pixels. Width is typically represented by the Y axis.

int get_width() const

Returns the Texture3D's width in pixels. Width is typically represented by the X axis.

bool has_mipmaps() const

Returns true if the Texture3D has generated mipmaps.

Source revision 4f5b14abade2
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.