123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- :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/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`` |
- +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+
- | |bitfield|\[: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>`\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) |
- +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`remove_shareable_format<class_RDTextureFormat_method_remove_shareable_format>`\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) |
- +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
- .. 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`` :ref:`🔗<class_RDTextureFormat_property_array_layers>`
- .. rst-class:: classref-property-setget
- - |void| **set_array_layers**\ (\ value\: :ref:`int<class_int>`\ )
- - :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`` :ref:`🔗<class_RDTextureFormat_property_depth>`
- .. rst-class:: classref-property-setget
- - |void| **set_depth**\ (\ value\: :ref:`int<class_int>`\ )
- - :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`` :ref:`🔗<class_RDTextureFormat_property_format>`
- .. rst-class:: classref-property-setget
- - |void| **set_format**\ (\ value\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ )
- - :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`` :ref:`🔗<class_RDTextureFormat_property_height>`
- .. rst-class:: classref-property-setget
- - |void| **set_height**\ (\ value\: :ref:`int<class_int>`\ )
- - :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`` :ref:`🔗<class_RDTextureFormat_property_mipmaps>`
- .. rst-class:: classref-property-setget
- - |void| **set_mipmaps**\ (\ value\: :ref:`int<class_int>`\ )
- - :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`` :ref:`🔗<class_RDTextureFormat_property_samples>`
- .. rst-class:: classref-property-setget
- - |void| **set_samples**\ (\ value\: :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>`\ )
- - :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`` :ref:`🔗<class_RDTextureFormat_property_texture_type>`
- .. rst-class:: classref-property-setget
- - |void| **set_texture_type**\ (\ value\: :ref:`TextureType<enum_RenderingDevice_TextureType>`\ )
- - :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
- |bitfield|\[:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\] **usage_bits** = ``0`` :ref:`🔗<class_RDTextureFormat_property_usage_bits>`
- .. rst-class:: classref-property-setget
- - |void| **set_usage_bits**\ (\ value\: |bitfield|\[:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\]\ )
- - |bitfield|\[: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`` :ref:`🔗<class_RDTextureFormat_property_width>`
- .. rst-class:: classref-property-setget
- - |void| **set_width**\ (\ value\: :ref:`int<class_int>`\ )
- - :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**\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) :ref:`🔗<class_RDTextureFormat_method_add_shareable_format>`
- Adds ``format`` as a valid format for the corresponding :ref:`RDTextureView<class_RDTextureView>`'s :ref:`RDTextureView.format_override<class_RDTextureView_property_format_override>` property. If any format is added as shareable, then the main :ref:`format<class_RDTextureFormat_property_format>` must also be added.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDTextureFormat_method_remove_shareable_format:
- .. rst-class:: classref-method
- |void| **remove_shareable_format**\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) :ref:`🔗<class_RDTextureFormat_method_remove_shareable_format>`
- Removes ``format`` from the list of valid formats that the corresponding :ref:`RDTextureView<class_RDTextureView>`'s :ref:`RDTextureView.format_override<class_RDTextureView_property_format_override>` property can be set to.
- .. |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.)`
|