Files
godot-docs-l10n/classes/ru/class_rdtextureformat.rst

297 lines
14 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_RDTextureFormat:
RDTextureFormat
===============
**Наследует:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Формат текстуры (используется :ref:`RenderingDevice<class_RenderingDevice>`).
.. rst-class:: classref-introduction-group
Описание
----------------
Этот объект используется :ref:`RenderingDevice<class_RenderingDevice>`.
.. rst-class:: classref-reftable-group
Свойства
----------------
.. 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
Методы
------------
.. 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
Описания свойств
--------------------------------
.. _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**\ (\ )
Количество слоев в текстуре. Актуально только для массивов 2D-текстур.
.. 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**\ (\ )
Глубина текстуры (в пикселях). Для 2D-текстур это всегда ``1``.
.. 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**\ (\ )
Формат пиксельных данных текстуры.
.. 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**\ (\ )
Высота текстуры (в пикселях).
.. 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**\ (\ )
Если текстура может быть отброшена, ее содержимое не нужно сохранять между кадрами. Этот флаг имеет значение только тогда, когда текстура используется как цель в списке отрисовки.
Эта информация используется :ref:`RenderingDevice<class_RenderingDevice>` для определения того, можно ли отбросить содержимое текстуры, что исключает ненужные записи в память и повышает производительность.
.. 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**\ (\ )
Текстура будет использоваться в качестве назначения операции разрешения.
.. 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**\ (\ )
Количество MIP-текстур, доступных в текстуре.
.. 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**\ (\ )
Количество образцов, использованных при отборе проб текстуры.
.. 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**\ (\ )
Тип текстуры.
.. 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**\ (\ )
Биты использования текстуры, которые определяют, что можно сделать с использованием текстуры.
.. 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**\ (\ )
Ширина текстуры (в пикселях).
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Описания метода
------------------------------
.. _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>`
Добавляет ``format`` как допустимый формат для соответствующего свойства :ref:`RDTextureView.format_override<class_RDTextureView_property_format_override>` :ref:`RDTextureView<class_RDTextureView>`. Если какой-либо формат добавляется как общий, то основной :ref:`format<class_RDTextureFormat_property_format>` также должен быть добавлен.
.. 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>`
Удаляет ``format`` из списка допустимых форматов, которые могут быть установлены для соответствующего свойства :ref:`RDTextureView<class_RDTextureFormat_property_RDTextureView>`.
.. |virtual| replace:: :abbr:`virtual (Этот метод обычно должен быть переопределен пользователем, чтобы иметь какой-либо эффект.)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (Этот метод не имеет побочных эффектов. Он не изменяет ни одну из переменных-членов экземпляра.)`
.. |vararg| replace:: :abbr:`vararg (Этот метод принимает любое количество аргументов после описанных здесь.)`
.. |constructor| replace:: :abbr:`constructor (Этот метод используется для создания типа.)`
.. |static| replace:: :abbr:`static (Этот метод не нуждается в вызове экземпляра, поэтому его можно вызвать напрямую, используя имя класса.)`
.. |operator| replace:: :abbr:`operator (Этот метод описывает допустимый оператор для использования с этим типом в качестве левого операнда.)`
.. |bitfield| replace:: :abbr:`BitField (Это значение является целым числом, составленным как битовая маска следующих флагов.)`
.. |void| replace:: :abbr:`void (Нет возвращаемого значения.)`