:github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the TextureLayered.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_TextureLayered: TextureLayered ============== **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` **Inherited By:** :ref:`CompressedTextureLayered`, :ref:`ImageTextureLayered` Base class for 3D texture types. Description ----------- Base class for :ref:`Texture2DArray`, :ref:`Cubemap` and :ref:`CubemapArray`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. Data is set on a per-layer basis. For :ref:`Texture2DArray`\ s, the layer specifies the array layer. Methods ------- +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Format` | :ref:`_get_format` **(** **)** |virtual| |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`_get_layer_data` **(** :ref:`int` layer_index **)** |virtual| |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_layered_type` **(** **)** |virtual| |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_layers` **(** **)** |virtual| |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_has_mipmaps` **(** **)** |virtual| |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Format` | :ref:`get_format` **(** **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_height` **(** **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`get_layer_data` **(** :ref:`int` layer **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`LayeredType` | :ref:`get_layered_type` **(** **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_layers` **(** **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_width` **(** **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ .. _enum_TextureLayered_LayeredType: .. _class_TextureLayered_constant_LAYERED_TYPE_2D_ARRAY: .. _class_TextureLayered_constant_LAYERED_TYPE_CUBEMAP: .. _class_TextureLayered_constant_LAYERED_TYPE_CUBEMAP_ARRAY: enum **LayeredType**: - **LAYERED_TYPE_2D_ARRAY** = **0** - **LAYERED_TYPE_CUBEMAP** = **1** - **LAYERED_TYPE_CUBEMAP_ARRAY** = **2** Method Descriptions ------------------- .. _class_TextureLayered_method__get_format: - :ref:`Format` **_get_format** **(** **)** |virtual| |const| ---- .. _class_TextureLayered_method__get_height: - :ref:`int` **_get_height** **(** **)** |virtual| |const| ---- .. _class_TextureLayered_method__get_layer_data: - :ref:`Image` **_get_layer_data** **(** :ref:`int` layer_index **)** |virtual| |const| ---- .. _class_TextureLayered_method__get_layered_type: - :ref:`int` **_get_layered_type** **(** **)** |virtual| |const| ---- .. _class_TextureLayered_method__get_layers: - :ref:`int` **_get_layers** **(** **)** |virtual| |const| ---- .. _class_TextureLayered_method__get_width: - :ref:`int` **_get_width** **(** **)** |virtual| |const| ---- .. _class_TextureLayered_method__has_mipmaps: - :ref:`bool` **_has_mipmaps** **(** **)** |virtual| |const| ---- .. _class_TextureLayered_method_get_format: - :ref:`Format` **get_format** **(** **)** |const| Returns the current format being used by this texture. See :ref:`Format` for details. ---- .. _class_TextureLayered_method_get_height: - :ref:`int` **get_height** **(** **)** |const| Returns the height of the texture. Height is typically represented by the Y-axis. ---- .. _class_TextureLayered_method_get_layer_data: - :ref:`Image` **get_layer_data** **(** :ref:`int` layer **)** |const| Returns an :ref:`Image` resource with the data from specified ``layer``. ---- .. _class_TextureLayered_method_get_layered_type: - :ref:`LayeredType` **get_layered_type** **(** **)** |const| ---- .. _class_TextureLayered_method_get_layers: - :ref:`int` **get_layers** **(** **)** |const| ---- .. _class_TextureLayered_method_get_width: - :ref:`int` **get_width** **(** **)** |const| Returns the width of the texture. Width is typically represented by the X-axis. ---- .. _class_TextureLayered_method_has_mipmaps: - :ref:`bool` **has_mipmaps** **(** **)** |const| .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`