123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TextureLayered.xml.
- .. _class_TextureLayered:
- TextureLayered
- ==============
- **Inherits:** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
- **Inherited By:** :ref:`CompressedTextureLayered<class_CompressedTextureLayered>`, :ref:`ImageTextureLayered<class_ImageTextureLayered>`, :ref:`PlaceholderTextureLayered<class_PlaceholderTextureLayered>`, :ref:`TextureLayeredRD<class_TextureLayeredRD>`
- Base class for texture types which contain the data of multiple :ref:`Image<class_Image>`\ s. Each image is of the same size and format.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- Base class for :ref:`ImageTextureLayered<class_ImageTextureLayered>` and :ref:`CompressedTextureLayered<class_CompressedTextureLayered>`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also :ref:`Texture3D<class_Texture3D>`.
- Data is set on a per-layer basis. For :ref:`Texture2DArray<class_Texture2DArray>`\ s, 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 :ref:`ResourceLoader.load<class_ResourceLoader_method_load>`.
- Internally, Godot maps these files to their respective counterparts in the target rendering driver (Vulkan, OpenGL3).
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Format<enum_Image_Format>` | :ref:`_get_format<class_TextureLayered_private_method__get_format>`\ (\ ) |virtual| |const| |
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`_get_height<class_TextureLayered_private_method__get_height>`\ (\ ) |virtual| |const| |
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Image<class_Image>` | :ref:`_get_layer_data<class_TextureLayered_private_method__get_layer_data>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |virtual| |const| |
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`_get_layered_type<class_TextureLayered_private_method__get_layered_type>`\ (\ ) |virtual| |const| |
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`_get_layers<class_TextureLayered_private_method__get_layers>`\ (\ ) |virtual| |const| |
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`_get_width<class_TextureLayered_private_method__get_width>`\ (\ ) |virtual| |const| |
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`_has_mipmaps<class_TextureLayered_private_method__has_mipmaps>`\ (\ ) |virtual| |const| |
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_TextureLayered_method_get_format>`\ (\ ) |const| |
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_height<class_TextureLayered_method_get_height>`\ (\ ) |const| |
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Image<class_Image>` | :ref:`get_layer_data<class_TextureLayered_method_get_layer_data>`\ (\ layer\: :ref:`int<class_int>`\ ) |const| |
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`LayeredType<enum_TextureLayered_LayeredType>` | :ref:`get_layered_type<class_TextureLayered_method_get_layered_type>`\ (\ ) |const| |
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_layers<class_TextureLayered_method_get_layers>`\ (\ ) |const| |
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_width<class_TextureLayered_method_get_width>`\ (\ ) |const| |
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_mipmaps<class_TextureLayered_method_has_mipmaps>`\ (\ ) |const| |
- +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Enumerations
- ------------
- .. _enum_TextureLayered_LayeredType:
- .. rst-class:: classref-enumeration
- enum **LayeredType**: :ref:`🔗<enum_TextureLayered_LayeredType>`
- .. _class_TextureLayered_constant_LAYERED_TYPE_2D_ARRAY:
- .. rst-class:: classref-enumeration-constant
- :ref:`LayeredType<enum_TextureLayered_LayeredType>` **LAYERED_TYPE_2D_ARRAY** = ``0``
- Texture is a generic :ref:`Texture2DArray<class_Texture2DArray>`.
- .. _class_TextureLayered_constant_LAYERED_TYPE_CUBEMAP:
- .. rst-class:: classref-enumeration-constant
- :ref:`LayeredType<enum_TextureLayered_LayeredType>` **LAYERED_TYPE_CUBEMAP** = ``1``
- Texture is a :ref:`Cubemap<class_Cubemap>`, with each side in its own layer (6 in total).
- .. _class_TextureLayered_constant_LAYERED_TYPE_CUBEMAP_ARRAY:
- .. rst-class:: classref-enumeration-constant
- :ref:`LayeredType<enum_TextureLayered_LayeredType>` **LAYERED_TYPE_CUBEMAP_ARRAY** = ``2``
- Texture is a :ref:`CubemapArray<class_CubemapArray>`, with each cubemap being made of 6 layers.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_TextureLayered_private_method__get_format:
- .. rst-class:: classref-method
- :ref:`Format<enum_Image_Format>` **_get_format**\ (\ ) |virtual| |const| :ref:`🔗<class_TextureLayered_private_method__get_format>`
- Called when the **TextureLayered**'s format is queried.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextureLayered_private_method__get_height:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **_get_height**\ (\ ) |virtual| |const| :ref:`🔗<class_TextureLayered_private_method__get_height>`
- Called when the **TextureLayered**'s height is queried.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextureLayered_private_method__get_layer_data:
- .. rst-class:: classref-method
- :ref:`Image<class_Image>` **_get_layer_data**\ (\ layer_index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextureLayered_private_method__get_layer_data>`
- Called when the data for a layer in the **TextureLayered** is queried.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextureLayered_private_method__get_layered_type:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **_get_layered_type**\ (\ ) |virtual| |const| :ref:`🔗<class_TextureLayered_private_method__get_layered_type>`
- Called when the layers' type in the **TextureLayered** is queried.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextureLayered_private_method__get_layers:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **_get_layers**\ (\ ) |virtual| |const| :ref:`🔗<class_TextureLayered_private_method__get_layers>`
- Called when the number of layers in the **TextureLayered** is queried.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextureLayered_private_method__get_width:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **_get_width**\ (\ ) |virtual| |const| :ref:`🔗<class_TextureLayered_private_method__get_width>`
- Called when the **TextureLayered**'s width queried.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextureLayered_private_method__has_mipmaps:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **_has_mipmaps**\ (\ ) |virtual| |const| :ref:`🔗<class_TextureLayered_private_method__has_mipmaps>`
- Called when the presence of mipmaps in the **TextureLayered** is queried.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextureLayered_method_get_format:
- .. rst-class:: classref-method
- :ref:`Format<enum_Image_Format>` **get_format**\ (\ ) |const| :ref:`🔗<class_TextureLayered_method_get_format>`
- Returns the current format being used by this texture. See :ref:`Format<enum_Image_Format>` for details.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextureLayered_method_get_height:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_height**\ (\ ) |const| :ref:`🔗<class_TextureLayered_method_get_height>`
- Returns the height of the texture in pixels. Height is typically represented by the Y axis.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextureLayered_method_get_layer_data:
- .. rst-class:: classref-method
- :ref:`Image<class_Image>` **get_layer_data**\ (\ layer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextureLayered_method_get_layer_data>`
- Returns an :ref:`Image<class_Image>` resource with the data from specified ``layer``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextureLayered_method_get_layered_type:
- .. rst-class:: classref-method
- :ref:`LayeredType<enum_TextureLayered_LayeredType>` **get_layered_type**\ (\ ) |const| :ref:`🔗<class_TextureLayered_method_get_layered_type>`
- Returns the **TextureLayered**'s type. The type determines how the data is accessed, with cubemaps having special types.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextureLayered_method_get_layers:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_layers**\ (\ ) |const| :ref:`🔗<class_TextureLayered_method_get_layers>`
- Returns the number of referenced :ref:`Image<class_Image>`\ s.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextureLayered_method_get_width:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_width**\ (\ ) |const| :ref:`🔗<class_TextureLayered_method_get_width>`
- Returns the width of the texture in pixels. Width is typically represented by the X axis.
- .. rst-class:: classref-item-separator
- ----
- .. _class_TextureLayered_method_has_mipmaps:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has_mipmaps**\ (\ ) |const| :ref:`🔗<class_TextureLayered_method_has_mipmaps>`
- Returns ``true`` if the layers have generated mipmaps.
- .. |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.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
- .. |void| replace:: :abbr:`void (No return value.)`
|