Table of Contents

Class TextureLayered

Namespace
Godot
Assembly
GodotSharp.dll

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 Load(string, string, CacheMode).

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

public class TextureLayered : Texture, IDisposable
Inheritance
TextureLayered
Implements
Derived
Inherited Members

Constructors

TextureLayered()

public TextureLayered()

Methods

GetFormat()

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

public Image.Format GetFormat()

Returns

Image.Format

GetHeight()

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

public int GetHeight()

Returns

int

GetLayerData(int)

Returns an Image resource with the data from specified layer.

public Image GetLayerData(int layer)

Parameters

layer int

Returns

Image

GetLayeredType()

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

public TextureLayered.LayeredType GetLayeredType()

Returns

TextureLayered.LayeredType

GetLayers()

Returns the number of referenced Images.

public int GetLayers()

Returns

int

GetWidth()

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

public int GetWidth()

Returns

int

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

HasMipmaps()

Returns true if the layers have generated mipmaps.

public bool HasMipmaps()

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool

_GetFormat()

Called when the TextureLayered's format is queried.

public virtual Image.Format _GetFormat()

Returns

Image.Format

_GetHeight()

Called when the TextureLayered's height is queried.

public virtual int _GetHeight()

Returns

int

_GetLayerData(int)

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

public virtual Image _GetLayerData(int layerIndex)

Parameters

layerIndex int

Returns

Image

_GetLayeredType()

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

public virtual uint _GetLayeredType()

Returns

uint

_GetLayers()

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

public virtual int _GetLayers()

Returns

int

_GetWidth()

Called when the TextureLayered's width queried.

public virtual int _GetWidth()

Returns

int

_HasMipmaps()

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

public virtual bool _HasMipmaps()

Returns

bool