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
GetHeight()
Returns the height of the texture in pixels. Height is typically represented by the Y axis.
public int GetHeight()
Returns
GetLayerData(int)
Returns an Image resource with the data from specified layer
.
public Image GetLayerData(int layer)
Parameters
layer
int
Returns
GetLayeredType()
Returns the TextureLayered's type. The type determines how the data is accessed, with cubemaps having special types.
public TextureLayered.LayeredType GetLayeredType()
Returns
GetLayers()
Returns the number of referenced Images.
public int GetLayers()
Returns
GetWidth()
Returns the width of the texture in pixels. Width is typically represented by the X axis.
public int GetWidth()
Returns
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_nameName of the method to check for.
Returns
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_nameName of the signal to check for.
Returns
HasMipmaps()
Returns true
if the layers have generated mipmaps.
public bool HasMipmaps()
Returns
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_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
_GetFormat()
Called when the TextureLayered's format is queried.
public virtual Image.Format _GetFormat()
Returns
_GetHeight()
Called when the TextureLayered's height is queried.
public virtual int _GetHeight()
Returns
_GetLayerData(int)
Called when the data for a layer in the TextureLayered is queried.
public virtual Image _GetLayerData(int layerIndex)
Parameters
layerIndex
int
Returns
_GetLayeredType()
Called when the layers' type in the TextureLayered is queried.
public virtual uint _GetLayeredType()
Returns
_GetLayers()
Called when the number of layers in the TextureLayered is queried.
public virtual int _GetLayers()
Returns
_GetWidth()
Called when the TextureLayered's width queried.
public virtual int _GetWidth()
Returns
_HasMipmaps()
Called when the presence of mipmaps in the TextureLayered is queried.
public virtual bool _HasMipmaps()