class_rdtextureformat.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RDTextureFormat.xml.
  6. .. _class_RDTextureFormat:
  7. RDTextureFormat
  8. ===============
  9. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Texture format (used by :ref:`RenderingDevice<class_RenderingDevice>`).
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This object is used by :ref:`RenderingDevice<class_RenderingDevice>`.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+
  21. | :ref:`int<class_int>` | :ref:`array_layers<class_RDTextureFormat_property_array_layers>` | ``1`` |
  22. +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+
  23. | :ref:`int<class_int>` | :ref:`depth<class_RDTextureFormat_property_depth>` | ``1`` |
  24. +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+
  25. | :ref:`DataFormat<enum_RenderingDevice_DataFormat>` | :ref:`format<class_RDTextureFormat_property_format>` | ``8`` |
  26. +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+
  27. | :ref:`int<class_int>` | :ref:`height<class_RDTextureFormat_property_height>` | ``1`` |
  28. +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+
  29. | :ref:`int<class_int>` | :ref:`mipmaps<class_RDTextureFormat_property_mipmaps>` | ``1`` |
  30. +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+
  31. | :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` | :ref:`samples<class_RDTextureFormat_property_samples>` | ``0`` |
  32. +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+
  33. | :ref:`TextureType<enum_RenderingDevice_TextureType>` | :ref:`texture_type<class_RDTextureFormat_property_texture_type>` | ``1`` |
  34. +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+
  35. | |bitfield|\[:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\] | :ref:`usage_bits<class_RDTextureFormat_property_usage_bits>` | ``0`` |
  36. +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+
  37. | :ref:`int<class_int>` | :ref:`width<class_RDTextureFormat_property_width>` | ``1`` |
  38. +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+
  39. .. rst-class:: classref-reftable-group
  40. Methods
  41. -------
  42. .. table::
  43. :widths: auto
  44. +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | |void| | :ref:`add_shareable_format<class_RDTextureFormat_method_add_shareable_format>`\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) |
  46. +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | |void| | :ref:`remove_shareable_format<class_RDTextureFormat_method_remove_shareable_format>`\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) |
  48. +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. .. rst-class:: classref-section-separator
  50. ----
  51. .. rst-class:: classref-descriptions-group
  52. Property Descriptions
  53. ---------------------
  54. .. _class_RDTextureFormat_property_array_layers:
  55. .. rst-class:: classref-property
  56. :ref:`int<class_int>` **array_layers** = ``1`` :ref:`🔗<class_RDTextureFormat_property_array_layers>`
  57. .. rst-class:: classref-property-setget
  58. - |void| **set_array_layers**\ (\ value\: :ref:`int<class_int>`\ )
  59. - :ref:`int<class_int>` **get_array_layers**\ (\ )
  60. The number of layers in the texture. Only relevant for 2D texture arrays.
  61. .. rst-class:: classref-item-separator
  62. ----
  63. .. _class_RDTextureFormat_property_depth:
  64. .. rst-class:: classref-property
  65. :ref:`int<class_int>` **depth** = ``1`` :ref:`🔗<class_RDTextureFormat_property_depth>`
  66. .. rst-class:: classref-property-setget
  67. - |void| **set_depth**\ (\ value\: :ref:`int<class_int>`\ )
  68. - :ref:`int<class_int>` **get_depth**\ (\ )
  69. The texture's depth (in pixels). This is always ``1`` for 2D textures.
  70. .. rst-class:: classref-item-separator
  71. ----
  72. .. _class_RDTextureFormat_property_format:
  73. .. rst-class:: classref-property
  74. :ref:`DataFormat<enum_RenderingDevice_DataFormat>` **format** = ``8`` :ref:`🔗<class_RDTextureFormat_property_format>`
  75. .. rst-class:: classref-property-setget
  76. - |void| **set_format**\ (\ value\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ )
  77. - :ref:`DataFormat<enum_RenderingDevice_DataFormat>` **get_format**\ (\ )
  78. The texture's pixel data format.
  79. .. rst-class:: classref-item-separator
  80. ----
  81. .. _class_RDTextureFormat_property_height:
  82. .. rst-class:: classref-property
  83. :ref:`int<class_int>` **height** = ``1`` :ref:`🔗<class_RDTextureFormat_property_height>`
  84. .. rst-class:: classref-property-setget
  85. - |void| **set_height**\ (\ value\: :ref:`int<class_int>`\ )
  86. - :ref:`int<class_int>` **get_height**\ (\ )
  87. The texture's height (in pixels).
  88. .. rst-class:: classref-item-separator
  89. ----
  90. .. _class_RDTextureFormat_property_mipmaps:
  91. .. rst-class:: classref-property
  92. :ref:`int<class_int>` **mipmaps** = ``1`` :ref:`🔗<class_RDTextureFormat_property_mipmaps>`
  93. .. rst-class:: classref-property-setget
  94. - |void| **set_mipmaps**\ (\ value\: :ref:`int<class_int>`\ )
  95. - :ref:`int<class_int>` **get_mipmaps**\ (\ )
  96. The number of mipmaps available in the texture.
  97. .. rst-class:: classref-item-separator
  98. ----
  99. .. _class_RDTextureFormat_property_samples:
  100. .. rst-class:: classref-property
  101. :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **samples** = ``0`` :ref:`🔗<class_RDTextureFormat_property_samples>`
  102. .. rst-class:: classref-property-setget
  103. - |void| **set_samples**\ (\ value\: :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>`\ )
  104. - :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **get_samples**\ (\ )
  105. The number of samples used when sampling the texture.
  106. .. rst-class:: classref-item-separator
  107. ----
  108. .. _class_RDTextureFormat_property_texture_type:
  109. .. rst-class:: classref-property
  110. :ref:`TextureType<enum_RenderingDevice_TextureType>` **texture_type** = ``1`` :ref:`🔗<class_RDTextureFormat_property_texture_type>`
  111. .. rst-class:: classref-property-setget
  112. - |void| **set_texture_type**\ (\ value\: :ref:`TextureType<enum_RenderingDevice_TextureType>`\ )
  113. - :ref:`TextureType<enum_RenderingDevice_TextureType>` **get_texture_type**\ (\ )
  114. The texture type.
  115. .. rst-class:: classref-item-separator
  116. ----
  117. .. _class_RDTextureFormat_property_usage_bits:
  118. .. rst-class:: classref-property
  119. |bitfield|\[:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\] **usage_bits** = ``0`` :ref:`🔗<class_RDTextureFormat_property_usage_bits>`
  120. .. rst-class:: classref-property-setget
  121. - |void| **set_usage_bits**\ (\ value\: |bitfield|\[:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\]\ )
  122. - |bitfield|\[:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\] **get_usage_bits**\ (\ )
  123. The texture's usage bits, which determine what can be done using the texture.
  124. .. rst-class:: classref-item-separator
  125. ----
  126. .. _class_RDTextureFormat_property_width:
  127. .. rst-class:: classref-property
  128. :ref:`int<class_int>` **width** = ``1`` :ref:`🔗<class_RDTextureFormat_property_width>`
  129. .. rst-class:: classref-property-setget
  130. - |void| **set_width**\ (\ value\: :ref:`int<class_int>`\ )
  131. - :ref:`int<class_int>` **get_width**\ (\ )
  132. The texture's width (in pixels).
  133. .. rst-class:: classref-section-separator
  134. ----
  135. .. rst-class:: classref-descriptions-group
  136. Method Descriptions
  137. -------------------
  138. .. _class_RDTextureFormat_method_add_shareable_format:
  139. .. rst-class:: classref-method
  140. |void| **add_shareable_format**\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) :ref:`🔗<class_RDTextureFormat_method_add_shareable_format>`
  141. 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.
  142. .. rst-class:: classref-item-separator
  143. ----
  144. .. _class_RDTextureFormat_method_remove_shareable_format:
  145. .. rst-class:: classref-method
  146. |void| **remove_shareable_format**\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) :ref:`🔗<class_RDTextureFormat_method_remove_shareable_format>`
  147. 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.
  148. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  149. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  150. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  151. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  152. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  153. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  154. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  155. .. |void| replace:: :abbr:`void (No return value.)`