:github_url: hide .. _class_RDTextureFormat: RDTextureFormat =============== **Eredita:** :ref:`RefCounted` **<** :ref:`Object` Formato di texture (utilizzato da :ref:`RenderingDevice`). .. rst-class:: classref-introduction-group Descrizione ---------------------- Questo oggetto è utilizzato dal :ref:`RenderingDevice`. .. rst-class:: classref-reftable-group Proprietà ------------------ .. table:: :widths: auto +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`array_layers` | ``1`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`depth` | ``1`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ | :ref:`DataFormat` | :ref:`format` | ``8`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`height` | ``1`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`is_discardable` | ``false`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`is_resolve_buffer` | ``false`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`mipmaps` | ``1`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ | :ref:`TextureSamples` | :ref:`samples` | ``0`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ | :ref:`TextureType` | :ref:`texture_type` | ``1`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ | |bitfield|\[:ref:`TextureUsageBits`\] | :ref:`usage_bits` | ``0`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`width` | ``1`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group Metodi ------------ .. table:: :widths: auto +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_shareable_format`\ (\ format\: :ref:`DataFormat`\ ) | +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_shareable_format`\ (\ format\: :ref:`DataFormat`\ ) | +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Descrizioni delle proprietà ------------------------------------------------------ .. _class_RDTextureFormat_property_array_layers: .. rst-class:: classref-property :ref:`int` **array_layers** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_array_layers**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_array_layers**\ (\ ) Il numero di strati nella texture. Rilevante solo per gli array di texture 2D. .. rst-class:: classref-item-separator ---- .. _class_RDTextureFormat_property_depth: .. rst-class:: classref-property :ref:`int` **depth** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_depth**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_depth**\ (\ ) La profondità della texture (in pixel). Per le texture 2D è sempre ``1``. .. rst-class:: classref-item-separator ---- .. _class_RDTextureFormat_property_format: .. rst-class:: classref-property :ref:`DataFormat` **format** = ``8`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_format**\ (\ value\: :ref:`DataFormat`\ ) - :ref:`DataFormat` **get_format**\ (\ ) Il formato dei dati pixel della texture. .. rst-class:: classref-item-separator ---- .. _class_RDTextureFormat_property_height: .. rst-class:: classref-property :ref:`int` **height** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_height**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_height**\ (\ ) L'altezza della texture (in pixel). .. rst-class:: classref-item-separator ---- .. _class_RDTextureFormat_property_is_discardable: .. rst-class:: classref-property :ref:`bool` **is_discardable** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_is_discardable**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_is_discardable**\ (\ ) Se una texture è scartabile, non è necessario mantenere il suo contenuto tra un frame e l'altro. Questo flag è rilevante solo quando la texture è utilizzata come destinazione in una draw list. Questa informazione è utilizzata da :ref:`RenderingDevice` per determinare se è possibile scartare il contenuto di una texture, eliminando scritture inutili in memoria e migliorando le prestazioni. .. rst-class:: classref-item-separator ---- .. _class_RDTextureFormat_property_is_resolve_buffer: .. rst-class:: classref-property :ref:`bool` **is_resolve_buffer** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_is_resolve_buffer**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_is_resolve_buffer**\ (\ ) La texture sarà utilizzata come destinazione di un'operazione di risoluzione. .. rst-class:: classref-item-separator ---- .. _class_RDTextureFormat_property_mipmaps: .. rst-class:: classref-property :ref:`int` **mipmaps** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_mipmaps**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_mipmaps**\ (\ ) Il numero di mipmap disponibili nella texture. .. rst-class:: classref-item-separator ---- .. _class_RDTextureFormat_property_samples: .. rst-class:: classref-property :ref:`TextureSamples` **samples** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_samples**\ (\ value\: :ref:`TextureSamples`\ ) - :ref:`TextureSamples` **get_samples**\ (\ ) Il numero di campioni utilizzati durante il campionamento della texture. .. rst-class:: classref-item-separator ---- .. _class_RDTextureFormat_property_texture_type: .. rst-class:: classref-property :ref:`TextureType` **texture_type** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_texture_type**\ (\ value\: :ref:`TextureType`\ ) - :ref:`TextureType` **get_texture_type**\ (\ ) Il tipo di texture. .. rst-class:: classref-item-separator ---- .. _class_RDTextureFormat_property_usage_bits: .. rst-class:: classref-property |bitfield|\[:ref:`TextureUsageBits`\] **usage_bits** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_usage_bits**\ (\ value\: |bitfield|\[:ref:`TextureUsageBits`\]\ ) - |bitfield|\[:ref:`TextureUsageBits`\] **get_usage_bits**\ (\ ) I bit di utilizzo della texture, che determinano cosa può essere fatto utilizzando la texture. .. rst-class:: classref-item-separator ---- .. _class_RDTextureFormat_property_width: .. rst-class:: classref-property :ref:`int` **width** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_width**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_width**\ (\ ) La larghezza della texture (in pixel). .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Descrizioni dei metodi -------------------------------------------- .. _class_RDTextureFormat_method_add_shareable_format: .. rst-class:: classref-method |void| **add_shareable_format**\ (\ format\: :ref:`DataFormat`\ ) :ref:`🔗` Aggiunge ``format`` come formato valido per la proprietà :ref:`RDTextureView.format_override` del corrispondente :ref:`RDTextureView`. Se un qualsiasi formato viene aggiunto come condivisibile, è necessario aggiungere anche il formato principale :ref:`format`. .. rst-class:: classref-item-separator ---- .. _class_RDTextureFormat_method_remove_shareable_format: .. rst-class:: classref-method |void| **remove_shareable_format**\ (\ format\: :ref:`DataFormat`\ ) :ref:`🔗` Rimuove ``format`` dall'elenco dei formati validi su cui può essere impostata la proprietà :ref:`RDTextureView.format_override` del corrispondente :ref:`RDTextureView`. .. |virtual| replace:: :abbr:`virtual (Questo metodo dovrebbe solitamente essere sovrascritto dall'utente per aver un effetto.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (Questo metodo non ha effetti collaterali. Non modifica alcuna variabile appartenente all'istanza.)` .. |vararg| replace:: :abbr:`vararg (Questo metodo accetta qualsiasi numero di argomenti oltre a quelli descritti qui.)` .. |constructor| replace:: :abbr:`constructor (Questo metodo è utilizzato per creare un tipo.)` .. |static| replace:: :abbr:`static (Questo metodo non necessita di alcun'istanza per essere chiamato, quindi può essere chiamato direttamente usando il nome della classe.)` .. |operator| replace:: :abbr:`operator (Questo metodo descrive un operatore valido da usare con questo tipo come operando di sinistra.)` .. |bitfield| replace:: :abbr:`BitField (Questo valore è un intero composto da una maschera di bit dei seguenti flag.)` .. |void| replace:: :abbr:`void (Nessun valore restituito.)`