class_openxrcompositionlayer.rst 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  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/modules/openxr/doc_classes/OpenXRCompositionLayer.xml.
  6. .. _class_OpenXRCompositionLayer:
  7. OpenXRCompositionLayer
  8. ======================
  9. **Experimental:** This class may be changed or removed in future versions.
  10. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  11. **Inherited By:** :ref:`OpenXRCompositionLayerCylinder<class_OpenXRCompositionLayerCylinder>`, :ref:`OpenXRCompositionLayerEquirect<class_OpenXRCompositionLayerEquirect>`, :ref:`OpenXRCompositionLayerQuad<class_OpenXRCompositionLayerQuad>`
  12. The parent class of all OpenXR composition layer nodes.
  13. .. rst-class:: classref-introduction-group
  14. Description
  15. -----------
  16. Composition layers allow 2D viewports to be displayed inside of the headset by the XR compositor through special projections that retain their quality. This allows for rendering clear text while keeping the layer at a native resolution.
  17. \ **Note:** If the OpenXR runtime doesn't support the given composition layer type, a fallback mesh can be generated with a :ref:`ViewportTexture<class_ViewportTexture>`, in order to emulate the composition layer.
  18. .. rst-class:: classref-reftable-group
  19. Properties
  20. ----------
  21. .. table::
  22. :widths: auto
  23. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  24. | :ref:`bool<class_bool>` | :ref:`alpha_blend<class_OpenXRCompositionLayer_property_alpha_blend>` | ``false`` |
  25. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  26. | :ref:`Vector2i<class_Vector2i>` | :ref:`android_surface_size<class_OpenXRCompositionLayer_property_android_surface_size>` | ``Vector2i(1024, 1024)`` |
  27. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  28. | :ref:`bool<class_bool>` | :ref:`enable_hole_punch<class_OpenXRCompositionLayer_property_enable_hole_punch>` | ``false`` |
  29. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  30. | :ref:`SubViewport<class_SubViewport>` | :ref:`layer_viewport<class_OpenXRCompositionLayer_property_layer_viewport>` | |
  31. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  32. | :ref:`int<class_int>` | :ref:`sort_order<class_OpenXRCompositionLayer_property_sort_order>` | ``1`` |
  33. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  34. | :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` | :ref:`swapchain_state_alpha_swizzle<class_OpenXRCompositionLayer_property_swapchain_state_alpha_swizzle>` | ``3`` |
  35. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  36. | :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` | :ref:`swapchain_state_blue_swizzle<class_OpenXRCompositionLayer_property_swapchain_state_blue_swizzle>` | ``2`` |
  37. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  38. | :ref:`Color<class_Color>` | :ref:`swapchain_state_border_color<class_OpenXRCompositionLayer_property_swapchain_state_border_color>` | ``Color(0, 0, 0, 0)`` |
  39. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  40. | :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` | :ref:`swapchain_state_green_swizzle<class_OpenXRCompositionLayer_property_swapchain_state_green_swizzle>` | ``1`` |
  41. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  42. | :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` | :ref:`swapchain_state_horizontal_wrap<class_OpenXRCompositionLayer_property_swapchain_state_horizontal_wrap>` | ``0`` |
  43. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  44. | :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` | :ref:`swapchain_state_mag_filter<class_OpenXRCompositionLayer_property_swapchain_state_mag_filter>` | ``1`` |
  45. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  46. | :ref:`float<class_float>` | :ref:`swapchain_state_max_anisotropy<class_OpenXRCompositionLayer_property_swapchain_state_max_anisotropy>` | ``1.0`` |
  47. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  48. | :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` | :ref:`swapchain_state_min_filter<class_OpenXRCompositionLayer_property_swapchain_state_min_filter>` | ``1`` |
  49. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  50. | :ref:`MipmapMode<enum_OpenXRCompositionLayer_MipmapMode>` | :ref:`swapchain_state_mipmap_mode<class_OpenXRCompositionLayer_property_swapchain_state_mipmap_mode>` | ``2`` |
  51. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  52. | :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` | :ref:`swapchain_state_red_swizzle<class_OpenXRCompositionLayer_property_swapchain_state_red_swizzle>` | ``0`` |
  53. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  54. | :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` | :ref:`swapchain_state_vertical_wrap<class_OpenXRCompositionLayer_property_swapchain_state_vertical_wrap>` | ``0`` |
  55. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  56. | :ref:`bool<class_bool>` | :ref:`use_android_surface<class_OpenXRCompositionLayer_property_use_android_surface>` | ``false`` |
  57. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
  58. .. rst-class:: classref-reftable-group
  59. Methods
  60. -------
  61. .. table::
  62. :widths: auto
  63. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`JavaObject<class_JavaObject>` | :ref:`get_android_surface<class_OpenXRCompositionLayer_method_get_android_surface>`\ (\ ) |
  65. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`Vector2<class_Vector2>` | :ref:`intersects_ray<class_OpenXRCompositionLayer_method_intersects_ray>`\ (\ origin\: :ref:`Vector3<class_Vector3>`, direction\: :ref:`Vector3<class_Vector3>`\ ) |const| |
  67. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`bool<class_bool>` | :ref:`is_natively_supported<class_OpenXRCompositionLayer_method_is_natively_supported>`\ (\ ) |const| |
  69. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. .. rst-class:: classref-section-separator
  71. ----
  72. .. rst-class:: classref-descriptions-group
  73. Enumerations
  74. ------------
  75. .. _enum_OpenXRCompositionLayer_Filter:
  76. .. rst-class:: classref-enumeration
  77. enum **Filter**: :ref:`🔗<enum_OpenXRCompositionLayer_Filter>`
  78. .. _class_OpenXRCompositionLayer_constant_FILTER_NEAREST:
  79. .. rst-class:: classref-enumeration-constant
  80. :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` **FILTER_NEAREST** = ``0``
  81. Perform nearest-neighbor filtering when sampling the texture.
  82. .. _class_OpenXRCompositionLayer_constant_FILTER_LINEAR:
  83. .. rst-class:: classref-enumeration-constant
  84. :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` **FILTER_LINEAR** = ``1``
  85. Perform linear filtering when sampling the texture.
  86. .. _class_OpenXRCompositionLayer_constant_FILTER_CUBIC:
  87. .. rst-class:: classref-enumeration-constant
  88. :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` **FILTER_CUBIC** = ``2``
  89. Perform cubic filtering when sampling the texture.
  90. .. rst-class:: classref-item-separator
  91. ----
  92. .. _enum_OpenXRCompositionLayer_MipmapMode:
  93. .. rst-class:: classref-enumeration
  94. enum **MipmapMode**: :ref:`🔗<enum_OpenXRCompositionLayer_MipmapMode>`
  95. .. _class_OpenXRCompositionLayer_constant_MIPMAP_MODE_DISABLED:
  96. .. rst-class:: classref-enumeration-constant
  97. :ref:`MipmapMode<enum_OpenXRCompositionLayer_MipmapMode>` **MIPMAP_MODE_DISABLED** = ``0``
  98. Disable mipmapping.
  99. \ **Note:** Mipmapping can only be disabled in the Compatibility renderer.
  100. .. _class_OpenXRCompositionLayer_constant_MIPMAP_MODE_NEAREST:
  101. .. rst-class:: classref-enumeration-constant
  102. :ref:`MipmapMode<enum_OpenXRCompositionLayer_MipmapMode>` **MIPMAP_MODE_NEAREST** = ``1``
  103. Use the mipmap of the nearest resolution.
  104. .. _class_OpenXRCompositionLayer_constant_MIPMAP_MODE_LINEAR:
  105. .. rst-class:: classref-enumeration-constant
  106. :ref:`MipmapMode<enum_OpenXRCompositionLayer_MipmapMode>` **MIPMAP_MODE_LINEAR** = ``2``
  107. Use linear interpolation of the two mipmaps of the nearest resolution.
  108. .. rst-class:: classref-item-separator
  109. ----
  110. .. _enum_OpenXRCompositionLayer_Wrap:
  111. .. rst-class:: classref-enumeration
  112. enum **Wrap**: :ref:`🔗<enum_OpenXRCompositionLayer_Wrap>`
  113. .. _class_OpenXRCompositionLayer_constant_WRAP_CLAMP_TO_BORDER:
  114. .. rst-class:: classref-enumeration-constant
  115. :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **WRAP_CLAMP_TO_BORDER** = ``0``
  116. Clamp the texture to its specified border color.
  117. .. _class_OpenXRCompositionLayer_constant_WRAP_CLAMP_TO_EDGE:
  118. .. rst-class:: classref-enumeration-constant
  119. :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **WRAP_CLAMP_TO_EDGE** = ``1``
  120. Clamp the texture to its edge color.
  121. .. _class_OpenXRCompositionLayer_constant_WRAP_REPEAT:
  122. .. rst-class:: classref-enumeration-constant
  123. :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **WRAP_REPEAT** = ``2``
  124. Repeat the texture infinitely.
  125. .. _class_OpenXRCompositionLayer_constant_WRAP_MIRRORED_REPEAT:
  126. .. rst-class:: classref-enumeration-constant
  127. :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **WRAP_MIRRORED_REPEAT** = ``3``
  128. Repeat the texture infinitely, mirroring it on each repeat.
  129. .. _class_OpenXRCompositionLayer_constant_WRAP_MIRROR_CLAMP_TO_EDGE:
  130. .. rst-class:: classref-enumeration-constant
  131. :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **WRAP_MIRROR_CLAMP_TO_EDGE** = ``4``
  132. Mirror the texture once and then clamp the texture to its edge color.
  133. \ **Note:** This wrap mode is not available in the Compatibility renderer.
  134. .. rst-class:: classref-item-separator
  135. ----
  136. .. _enum_OpenXRCompositionLayer_Swizzle:
  137. .. rst-class:: classref-enumeration
  138. enum **Swizzle**: :ref:`🔗<enum_OpenXRCompositionLayer_Swizzle>`
  139. .. _class_OpenXRCompositionLayer_constant_SWIZZLE_RED:
  140. .. rst-class:: classref-enumeration-constant
  141. :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **SWIZZLE_RED** = ``0``
  142. Maps a color channel to the value of the red channel.
  143. .. _class_OpenXRCompositionLayer_constant_SWIZZLE_GREEN:
  144. .. rst-class:: classref-enumeration-constant
  145. :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **SWIZZLE_GREEN** = ``1``
  146. Maps a color channel to the value of the green channel.
  147. .. _class_OpenXRCompositionLayer_constant_SWIZZLE_BLUE:
  148. .. rst-class:: classref-enumeration-constant
  149. :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **SWIZZLE_BLUE** = ``2``
  150. Maps a color channel to the value of the blue channel.
  151. .. _class_OpenXRCompositionLayer_constant_SWIZZLE_ALPHA:
  152. .. rst-class:: classref-enumeration-constant
  153. :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **SWIZZLE_ALPHA** = ``3``
  154. Maps a color channel to the value of the alpha channel.
  155. .. _class_OpenXRCompositionLayer_constant_SWIZZLE_ZERO:
  156. .. rst-class:: classref-enumeration-constant
  157. :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **SWIZZLE_ZERO** = ``4``
  158. Maps a color channel to the value of zero.
  159. .. _class_OpenXRCompositionLayer_constant_SWIZZLE_ONE:
  160. .. rst-class:: classref-enumeration-constant
  161. :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **SWIZZLE_ONE** = ``5``
  162. Maps a color channel to the value of one.
  163. .. rst-class:: classref-section-separator
  164. ----
  165. .. rst-class:: classref-descriptions-group
  166. Property Descriptions
  167. ---------------------
  168. .. _class_OpenXRCompositionLayer_property_alpha_blend:
  169. .. rst-class:: classref-property
  170. :ref:`bool<class_bool>` **alpha_blend** = ``false`` :ref:`🔗<class_OpenXRCompositionLayer_property_alpha_blend>`
  171. .. rst-class:: classref-property-setget
  172. - |void| **set_alpha_blend**\ (\ value\: :ref:`bool<class_bool>`\ )
  173. - :ref:`bool<class_bool>` **get_alpha_blend**\ (\ )
  174. Enables the blending the layer using its alpha channel.
  175. Can be combined with :ref:`Viewport.transparent_bg<class_Viewport_property_transparent_bg>` to give the layer a transparent background.
  176. .. rst-class:: classref-item-separator
  177. ----
  178. .. _class_OpenXRCompositionLayer_property_android_surface_size:
  179. .. rst-class:: classref-property
  180. :ref:`Vector2i<class_Vector2i>` **android_surface_size** = ``Vector2i(1024, 1024)`` :ref:`🔗<class_OpenXRCompositionLayer_property_android_surface_size>`
  181. .. rst-class:: classref-property-setget
  182. - |void| **set_android_surface_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
  183. - :ref:`Vector2i<class_Vector2i>` **get_android_surface_size**\ (\ )
  184. The size of the Android surface to create if :ref:`use_android_surface<class_OpenXRCompositionLayer_property_use_android_surface>` is enabled.
  185. .. rst-class:: classref-item-separator
  186. ----
  187. .. _class_OpenXRCompositionLayer_property_enable_hole_punch:
  188. .. rst-class:: classref-property
  189. :ref:`bool<class_bool>` **enable_hole_punch** = ``false`` :ref:`🔗<class_OpenXRCompositionLayer_property_enable_hole_punch>`
  190. .. rst-class:: classref-property-setget
  191. - |void| **set_enable_hole_punch**\ (\ value\: :ref:`bool<class_bool>`\ )
  192. - :ref:`bool<class_bool>` **get_enable_hole_punch**\ (\ )
  193. Enables a technique called "hole punching", which allows putting the composition layer behind the main projection layer (i.e. setting :ref:`sort_order<class_OpenXRCompositionLayer_property_sort_order>` to a negative value) while "punching a hole" through everything rendered by Godot so that the layer is still visible.
  194. This can be used to create the illusion that the composition layer exists in the same 3D space as everything rendered by Godot, allowing objects to appear to pass both behind or in front of the composition layer.
  195. .. rst-class:: classref-item-separator
  196. ----
  197. .. _class_OpenXRCompositionLayer_property_layer_viewport:
  198. .. rst-class:: classref-property
  199. :ref:`SubViewport<class_SubViewport>` **layer_viewport** :ref:`🔗<class_OpenXRCompositionLayer_property_layer_viewport>`
  200. .. rst-class:: classref-property-setget
  201. - |void| **set_layer_viewport**\ (\ value\: :ref:`SubViewport<class_SubViewport>`\ )
  202. - :ref:`SubViewport<class_SubViewport>` **get_layer_viewport**\ (\ )
  203. The :ref:`SubViewport<class_SubViewport>` to render on the composition layer.
  204. .. rst-class:: classref-item-separator
  205. ----
  206. .. _class_OpenXRCompositionLayer_property_sort_order:
  207. .. rst-class:: classref-property
  208. :ref:`int<class_int>` **sort_order** = ``1`` :ref:`🔗<class_OpenXRCompositionLayer_property_sort_order>`
  209. .. rst-class:: classref-property-setget
  210. - |void| **set_sort_order**\ (\ value\: :ref:`int<class_int>`\ )
  211. - :ref:`int<class_int>` **get_sort_order**\ (\ )
  212. The sort order for this composition layer. Higher numbers will be shown in front of lower numbers.
  213. \ **Note:** This will have no effect if a fallback mesh is being used.
  214. .. rst-class:: classref-item-separator
  215. ----
  216. .. _class_OpenXRCompositionLayer_property_swapchain_state_alpha_swizzle:
  217. .. rst-class:: classref-property
  218. :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **swapchain_state_alpha_swizzle** = ``3`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_alpha_swizzle>`
  219. .. rst-class:: classref-property-setget
  220. - |void| **set_alpha_swizzle**\ (\ value\: :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>`\ )
  221. - :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **get_alpha_swizzle**\ (\ )
  222. The swizzle value for the alpha channel of the swapchain state.
  223. \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
  224. .. rst-class:: classref-item-separator
  225. ----
  226. .. _class_OpenXRCompositionLayer_property_swapchain_state_blue_swizzle:
  227. .. rst-class:: classref-property
  228. :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **swapchain_state_blue_swizzle** = ``2`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_blue_swizzle>`
  229. .. rst-class:: classref-property-setget
  230. - |void| **set_blue_swizzle**\ (\ value\: :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>`\ )
  231. - :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **get_blue_swizzle**\ (\ )
  232. The swizzle value for the blue channel of the swapchain state.
  233. \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
  234. .. rst-class:: classref-item-separator
  235. ----
  236. .. _class_OpenXRCompositionLayer_property_swapchain_state_border_color:
  237. .. rst-class:: classref-property
  238. :ref:`Color<class_Color>` **swapchain_state_border_color** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_border_color>`
  239. .. rst-class:: classref-property-setget
  240. - |void| **set_border_color**\ (\ value\: :ref:`Color<class_Color>`\ )
  241. - :ref:`Color<class_Color>` **get_border_color**\ (\ )
  242. The border color of the swapchain state that is used when the wrap mode clamps to the border.
  243. \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
  244. .. rst-class:: classref-item-separator
  245. ----
  246. .. _class_OpenXRCompositionLayer_property_swapchain_state_green_swizzle:
  247. .. rst-class:: classref-property
  248. :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **swapchain_state_green_swizzle** = ``1`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_green_swizzle>`
  249. .. rst-class:: classref-property-setget
  250. - |void| **set_green_swizzle**\ (\ value\: :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>`\ )
  251. - :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **get_green_swizzle**\ (\ )
  252. The swizzle value for the green channel of the swapchain state.
  253. \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
  254. .. rst-class:: classref-item-separator
  255. ----
  256. .. _class_OpenXRCompositionLayer_property_swapchain_state_horizontal_wrap:
  257. .. rst-class:: classref-property
  258. :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **swapchain_state_horizontal_wrap** = ``0`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_horizontal_wrap>`
  259. .. rst-class:: classref-property-setget
  260. - |void| **set_horizontal_wrap**\ (\ value\: :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>`\ )
  261. - :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **get_horizontal_wrap**\ (\ )
  262. The horizontal wrap mode of the swapchain state.
  263. \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
  264. .. rst-class:: classref-item-separator
  265. ----
  266. .. _class_OpenXRCompositionLayer_property_swapchain_state_mag_filter:
  267. .. rst-class:: classref-property
  268. :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` **swapchain_state_mag_filter** = ``1`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_mag_filter>`
  269. .. rst-class:: classref-property-setget
  270. - |void| **set_mag_filter**\ (\ value\: :ref:`Filter<enum_OpenXRCompositionLayer_Filter>`\ )
  271. - :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` **get_mag_filter**\ (\ )
  272. The magnification filter of the swapchain state.
  273. \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
  274. .. rst-class:: classref-item-separator
  275. ----
  276. .. _class_OpenXRCompositionLayer_property_swapchain_state_max_anisotropy:
  277. .. rst-class:: classref-property
  278. :ref:`float<class_float>` **swapchain_state_max_anisotropy** = ``1.0`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_max_anisotropy>`
  279. .. rst-class:: classref-property-setget
  280. - |void| **set_max_anisotropy**\ (\ value\: :ref:`float<class_float>`\ )
  281. - :ref:`float<class_float>` **get_max_anisotropy**\ (\ )
  282. The max anisotropy of the swapchain state.
  283. \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
  284. .. rst-class:: classref-item-separator
  285. ----
  286. .. _class_OpenXRCompositionLayer_property_swapchain_state_min_filter:
  287. .. rst-class:: classref-property
  288. :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` **swapchain_state_min_filter** = ``1`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_min_filter>`
  289. .. rst-class:: classref-property-setget
  290. - |void| **set_min_filter**\ (\ value\: :ref:`Filter<enum_OpenXRCompositionLayer_Filter>`\ )
  291. - :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` **get_min_filter**\ (\ )
  292. The minification filter of the swapchain state.
  293. \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
  294. .. rst-class:: classref-item-separator
  295. ----
  296. .. _class_OpenXRCompositionLayer_property_swapchain_state_mipmap_mode:
  297. .. rst-class:: classref-property
  298. :ref:`MipmapMode<enum_OpenXRCompositionLayer_MipmapMode>` **swapchain_state_mipmap_mode** = ``2`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_mipmap_mode>`
  299. .. rst-class:: classref-property-setget
  300. - |void| **set_mipmap_mode**\ (\ value\: :ref:`MipmapMode<enum_OpenXRCompositionLayer_MipmapMode>`\ )
  301. - :ref:`MipmapMode<enum_OpenXRCompositionLayer_MipmapMode>` **get_mipmap_mode**\ (\ )
  302. The mipmap mode of the swapchain state.
  303. \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
  304. .. rst-class:: classref-item-separator
  305. ----
  306. .. _class_OpenXRCompositionLayer_property_swapchain_state_red_swizzle:
  307. .. rst-class:: classref-property
  308. :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **swapchain_state_red_swizzle** = ``0`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_red_swizzle>`
  309. .. rst-class:: classref-property-setget
  310. - |void| **set_red_swizzle**\ (\ value\: :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>`\ )
  311. - :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **get_red_swizzle**\ (\ )
  312. The swizzle value for the red channel of the swapchain state.
  313. \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
  314. .. rst-class:: classref-item-separator
  315. ----
  316. .. _class_OpenXRCompositionLayer_property_swapchain_state_vertical_wrap:
  317. .. rst-class:: classref-property
  318. :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **swapchain_state_vertical_wrap** = ``0`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_vertical_wrap>`
  319. .. rst-class:: classref-property-setget
  320. - |void| **set_vertical_wrap**\ (\ value\: :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>`\ )
  321. - :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **get_vertical_wrap**\ (\ )
  322. The vertical wrap mode of the swapchain state.
  323. \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
  324. .. rst-class:: classref-item-separator
  325. ----
  326. .. _class_OpenXRCompositionLayer_property_use_android_surface:
  327. .. rst-class:: classref-property
  328. :ref:`bool<class_bool>` **use_android_surface** = ``false`` :ref:`🔗<class_OpenXRCompositionLayer_property_use_android_surface>`
  329. .. rst-class:: classref-property-setget
  330. - |void| **set_use_android_surface**\ (\ value\: :ref:`bool<class_bool>`\ )
  331. - :ref:`bool<class_bool>` **get_use_android_surface**\ (\ )
  332. If enabled, an Android surface will be created (with the dimensions from :ref:`android_surface_size<class_OpenXRCompositionLayer_property_android_surface_size>`) which will provide the 2D content for the composition layer, rather than using :ref:`layer_viewport<class_OpenXRCompositionLayer_property_layer_viewport>`.
  333. See :ref:`get_android_surface()<class_OpenXRCompositionLayer_method_get_android_surface>` for information about how to get the surface so that your application can draw to it.
  334. \ **Note:** This will only work in Android builds.
  335. .. rst-class:: classref-section-separator
  336. ----
  337. .. rst-class:: classref-descriptions-group
  338. Method Descriptions
  339. -------------------
  340. .. _class_OpenXRCompositionLayer_method_get_android_surface:
  341. .. rst-class:: classref-method
  342. :ref:`JavaObject<class_JavaObject>` **get_android_surface**\ (\ ) :ref:`🔗<class_OpenXRCompositionLayer_method_get_android_surface>`
  343. Returns a :ref:`JavaObject<class_JavaObject>` representing an ``android.view.Surface`` if :ref:`use_android_surface<class_OpenXRCompositionLayer_property_use_android_surface>` is enabled and OpenXR has created the surface. Otherwise, this will return ``null``.
  344. \ **Note:** The surface can only be created during an active OpenXR session. So, if :ref:`use_android_surface<class_OpenXRCompositionLayer_property_use_android_surface>` is enabled outside of an OpenXR session, it won't be created until a new session fully starts.
  345. .. rst-class:: classref-item-separator
  346. ----
  347. .. _class_OpenXRCompositionLayer_method_intersects_ray:
  348. .. rst-class:: classref-method
  349. :ref:`Vector2<class_Vector2>` **intersects_ray**\ (\ origin\: :ref:`Vector3<class_Vector3>`, direction\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_OpenXRCompositionLayer_method_intersects_ray>`
  350. Returns UV coordinates where the given ray intersects with the composition layer. ``origin`` and ``direction`` must be in global space.
  351. Returns ``Vector2(-1.0, -1.0)`` if the ray doesn't intersect.
  352. .. rst-class:: classref-item-separator
  353. ----
  354. .. _class_OpenXRCompositionLayer_method_is_natively_supported:
  355. .. rst-class:: classref-method
  356. :ref:`bool<class_bool>` **is_natively_supported**\ (\ ) |const| :ref:`🔗<class_OpenXRCompositionLayer_method_is_natively_supported>`
  357. Returns ``true`` if the OpenXR runtime natively supports this composition layer type.
  358. \ **Note:** This will only return an accurate result after the OpenXR session has started.
  359. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  360. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  361. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  362. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  363. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  364. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  365. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  366. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  367. .. |void| replace:: :abbr:`void (No return value.)`