mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +03:00
297 lines
13 KiB
ReStructuredText
297 lines
13 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_RDTextureFormat:
|
||
|
||
RDTextureFormat
|
||
===============
|
||
|
||
**Hérite de :** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||
|
||
Format de texture (utilisé par :ref:`RenderingDevice<class_RenderingDevice>`).
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Description
|
||
-----------
|
||
|
||
This object is used by :ref:`RenderingDevice<class_RenderingDevice>`.
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Propriétés
|
||
--------------------
|
||
|
||
.. 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:`bool<class_bool>` | :ref:`is_discardable<class_RDTextureFormat_property_is_discardable>` | ``false`` |
|
||
+------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_resolve_buffer<class_RDTextureFormat_property_is_resolve_buffer>` | ``false`` |
|
||
+------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+
|
||
| :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
|
||
|
||
Méthodes
|
||
----------------
|
||
|
||
.. 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
|
||
|
||
Descriptions des propriétés
|
||
------------------------------------------------------
|
||
|
||
.. _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**\ (\ )
|
||
|
||
Le format des données de pixels de la texture.
|
||
|
||
.. 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**\ (\ )
|
||
|
||
La hauteur de la texture (en pixels).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_RDTextureFormat_property_is_discardable:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **is_discardable** = ``false`` :ref:`🔗<class_RDTextureFormat_property_is_discardable>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_is_discardable**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_is_discardable**\ (\ )
|
||
|
||
If a texture is discardable, its contents do not need to be preserved between frames. This flag is only relevant when the texture is used as target in a draw list.
|
||
|
||
This information is used by :ref:`RenderingDevice<class_RenderingDevice>` to figure out if a texture's contents can be discarded, eliminating unnecessary writes to memory and boosting performance.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_RDTextureFormat_property_is_resolve_buffer:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **is_resolve_buffer** = ``false`` :ref:`🔗<class_RDTextureFormat_property_is_resolve_buffer>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_is_resolve_buffer**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_is_resolve_buffer**\ (\ )
|
||
|
||
The texture will be used as the destination of a resolve operation.
|
||
|
||
.. 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**\ (\ )
|
||
|
||
Le type de texture.
|
||
|
||
.. 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**\ (\ )
|
||
|
||
La largeur de la texture (en pixels).
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Descriptions des méthodes
|
||
--------------------------------------------------
|
||
|
||
.. _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 (Cette méthode doit typiquement être redéfinie par l'utilisateur pour avoir un effet.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Cette méthode n'a pas d'effets de bord. Elle ne modifie aucune des variables membres de l'instance.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Cette méthode accepte n'importe quel nombre d'arguments après ceux décris ici.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Cette méthode est utilisée pour construire un type.)`
|
||
.. |static| replace:: :abbr:`static (Cette méthode n'a pas besoin d'instance pour être appelée, elle peut donc être directement appelée en utilisant le nom de la classe.)`
|
||
.. |operator| replace:: :abbr:`operator (Cette méthode décrit un opérateur valide à utiliser avec ce type en tant qu'opérande gauche.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Cette valeur est un nombre entier composé d'un masque de bits des options suivantes.)`
|
||
.. |void| replace:: :abbr:`void (Aucune valeur de retour.)`
|