github_url: | hide |
---|
Inherits: :ref:`Texture<class_Texture>` < :ref:`Resource<class_Resource>` < :ref:`Reference<class_Reference>` < :ref:`Object<class_Object>`
Inherited By: :ref:`Cubemap<class_Cubemap>`, :ref:`CubemapArray<class_CubemapArray>`, :ref:`Texture2DArray<class_Texture2DArray>`
Base class for 3D texture types.
Base class for :ref:`Texture2DArray<class_Texture2DArray>`, :ref:`Cubemap<class_Cubemap>` and :ref:`CubemapArray<class_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<class_Texture2DArray>`s, the layer specifies the array layer.
- :ref:`Error<enum_@GlobalScope_Error>` create_from_images ( :ref:`Array<class_Array>` images )
- :ref:`Format<enum_Image_Format>` get_format ( ) const
Returns the current format being used by this texture. See :ref:`Format<enum_Image_Format>` for details.
- :ref:`int<class_int>` get_height ( ) const
Returns the height of the texture. Height is typically represented by the Y-axis.
- :ref:`Image<class_Image>` get_layer_data ( :ref:`int<class_int>` layer ) const
Returns an :ref:`Image<class_Image>` resource with the data from specified layer
.
- :ref:`int<class_int>` get_layers ( ) const
- :ref:`int<class_int>` get_width ( ) const
Returns the width of the texture. Width is typically represented by the X-axis.
- void update_layer ( :ref:`Image<class_Image>` image, :ref:`int<class_int>` layer )