Files
godot-docs/classes/class_rdtextureformat.rst
2023-05-19 13:35:34 +00:00

263 lines
9.7 KiB
ReStructuredText

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/4.0/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/RDTextureFormat.xml.
.. _class_RDTextureFormat:
RDTextureFormat
===============
**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Texture format (used by :ref:`RenderingDevice<class_RenderingDevice>`).
.. rst-class:: classref-introduction-group
Description
-----------
This object is used by :ref:`RenderingDevice<class_RenderingDevice>`.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+----------------------------------------------------------------+------------------------------------------------------------------+-------+
| :ref:`int<class_int>` | :ref:`array_layers<class_RDTextureFormat_property_array_layers>` | ``1`` |
+----------------------------------------------------------------+------------------------------------------------------------------+-------+
| :ref:`int<class_int>` | :ref:`depth<class_RDTextureFormat_property_depth>` | ``1`` |
+----------------------------------------------------------------+------------------------------------------------------------------+-------+
| :ref:`DataFormat<enum_RenderingDevice_DataFormat>` | :ref:`format<class_RDTextureFormat_property_format>` | ``8`` |
+----------------------------------------------------------------+------------------------------------------------------------------+-------+
| :ref:`int<class_int>` | :ref:`height<class_RDTextureFormat_property_height>` | ``1`` |
+----------------------------------------------------------------+------------------------------------------------------------------+-------+
| :ref:`int<class_int>` | :ref:`mipmaps<class_RDTextureFormat_property_mipmaps>` | ``1`` |
+----------------------------------------------------------------+------------------------------------------------------------------+-------+
| :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` | :ref:`samples<class_RDTextureFormat_property_samples>` | ``0`` |
+----------------------------------------------------------------+------------------------------------------------------------------+-------+
| :ref:`TextureType<enum_RenderingDevice_TextureType>` | :ref:`texture_type<class_RDTextureFormat_property_texture_type>` | ``1`` |
+----------------------------------------------------------------+------------------------------------------------------------------+-------+
| :ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>` | :ref:`usage_bits<class_RDTextureFormat_property_usage_bits>` | ``0`` |
+----------------------------------------------------------------+------------------------------------------------------------------+-------+
| :ref:`int<class_int>` | :ref:`width<class_RDTextureFormat_property_width>` | ``1`` |
+----------------------------------------------------------------+------------------------------------------------------------------+-------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_shareable_format<class_RDTextureFormat_method_add_shareable_format>` **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` format **)** |
+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`remove_shareable_format<class_RDTextureFormat_method_remove_shareable_format>` **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` format **)** |
+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_RDTextureFormat_property_array_layers:
.. rst-class:: classref-property
:ref:`int<class_int>` **array_layers** = ``1``
.. rst-class:: classref-property-setget
- void **set_array_layers** **(** :ref:`int<class_int>` value **)**
- :ref:`int<class_int>` **get_array_layers** **(** **)**
The number of layers in the texture. Only relevant for 2D texture arrays.
.. rst-class:: classref-item-separator
----
.. _class_RDTextureFormat_property_depth:
.. rst-class:: classref-property
:ref:`int<class_int>` **depth** = ``1``
.. rst-class:: classref-property-setget
- void **set_depth** **(** :ref:`int<class_int>` value **)**
- :ref:`int<class_int>` **get_depth** **(** **)**
The texture's depth (in pixels). This is always ``1`` for 2D textures.
.. rst-class:: classref-item-separator
----
.. _class_RDTextureFormat_property_format:
.. rst-class:: classref-property
:ref:`DataFormat<enum_RenderingDevice_DataFormat>` **format** = ``8``
.. rst-class:: classref-property-setget
- void **set_format** **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` value **)**
- :ref:`DataFormat<enum_RenderingDevice_DataFormat>` **get_format** **(** **)**
The texture's pixel data format.
.. rst-class:: classref-item-separator
----
.. _class_RDTextureFormat_property_height:
.. rst-class:: classref-property
:ref:`int<class_int>` **height** = ``1``
.. rst-class:: classref-property-setget
- void **set_height** **(** :ref:`int<class_int>` value **)**
- :ref:`int<class_int>` **get_height** **(** **)**
The texture's height (in pixels).
.. rst-class:: classref-item-separator
----
.. _class_RDTextureFormat_property_mipmaps:
.. rst-class:: classref-property
:ref:`int<class_int>` **mipmaps** = ``1``
.. rst-class:: classref-property-setget
- void **set_mipmaps** **(** :ref:`int<class_int>` value **)**
- :ref:`int<class_int>` **get_mipmaps** **(** **)**
The number of mipmaps available in the texture.
.. rst-class:: classref-item-separator
----
.. _class_RDTextureFormat_property_samples:
.. rst-class:: classref-property
:ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **samples** = ``0``
.. rst-class:: classref-property-setget
- void **set_samples** **(** :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` value **)**
- :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **get_samples** **(** **)**
The number of samples used when sampling the texture.
.. rst-class:: classref-item-separator
----
.. _class_RDTextureFormat_property_texture_type:
.. rst-class:: classref-property
:ref:`TextureType<enum_RenderingDevice_TextureType>` **texture_type** = ``1``
.. rst-class:: classref-property-setget
- void **set_texture_type** **(** :ref:`TextureType<enum_RenderingDevice_TextureType>` value **)**
- :ref:`TextureType<enum_RenderingDevice_TextureType>` **get_texture_type** **(** **)**
The texture type.
.. rst-class:: classref-item-separator
----
.. _class_RDTextureFormat_property_usage_bits:
.. rst-class:: classref-property
:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>` **usage_bits** = ``0``
.. rst-class:: classref-property-setget
- void **set_usage_bits** **(** :ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>` value **)**
- :ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>` **get_usage_bits** **(** **)**
The texture's usage bits, which determine what can be done using the texture.
.. rst-class:: classref-item-separator
----
.. _class_RDTextureFormat_property_width:
.. rst-class:: classref-property
:ref:`int<class_int>` **width** = ``1``
.. rst-class:: classref-property-setget
- void **set_width** **(** :ref:`int<class_int>` value **)**
- :ref:`int<class_int>` **get_width** **(** **)**
The texture's width (in pixels).
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_RDTextureFormat_method_add_shareable_format:
.. rst-class:: classref-method
void **add_shareable_format** **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` format **)**
.. container:: contribute
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator
----
.. _class_RDTextureFormat_method_remove_shareable_format:
.. rst-class:: classref-method
void **remove_shareable_format** **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` format **)**
.. container:: contribute
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. |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.)`