class_openxrapiextension.rst 59 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  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/OpenXRAPIExtension.xml.
  6. .. _class_OpenXRAPIExtension:
  7. OpenXRAPIExtension
  8. ==================
  9. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Makes the OpenXR API available for GDExtension.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **OpenXRAPIExtension** makes OpenXR available for GDExtension. It provides the OpenXR API to GDExtension through the :ref:`get_instance_proc_addr()<class_OpenXRAPIExtension_method_get_instance_proc_addr>` method, and the OpenXR instance through :ref:`get_instance()<class_OpenXRAPIExtension_method_get_instance>`.
  15. It also provides methods for querying the status of OpenXR initialization, and helper methods for ease of use of the API with GDExtension.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - `XrResult documentation <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html>`__
  20. - `XrInstance documentation <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrInstance.html>`__
  21. - `XrSpace documentation <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSpace.html>`__
  22. - `XrSession documentation <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSession.html>`__
  23. - `XrSystemId documentation <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSystemId.html>`__
  24. - `xrBeginSession documentation <https://registry.khronos.org/OpenXR/specs/1.0/man/html/xrBeginSession.html>`__
  25. - `XrPosef documentation <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrPosef.html>`__
  26. .. rst-class:: classref-reftable-group
  27. Methods
  28. -------
  29. .. table::
  30. :widths: auto
  31. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`int<class_int>` | :ref:`action_get_handle<class_OpenXRAPIExtension_method_action_get_handle>`\ (\ action\: :ref:`RID<class_RID>`\ ) |
  33. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | |void| | :ref:`begin_debug_label_region<class_OpenXRAPIExtension_method_begin_debug_label_region>`\ (\ label_name\: :ref:`String<class_String>`\ ) |
  35. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`bool<class_bool>` | :ref:`can_render<class_OpenXRAPIExtension_method_can_render>`\ (\ ) |
  37. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | |void| | :ref:`end_debug_label_region<class_OpenXRAPIExtension_method_end_debug_label_region>`\ (\ ) |
  39. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`RID<class_RID>` | :ref:`find_action<class_OpenXRAPIExtension_method_find_action>`\ (\ name\: :ref:`String<class_String>`, action_set\: :ref:`RID<class_RID>`\ ) |
  41. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`String<class_String>` | :ref:`get_error_string<class_OpenXRAPIExtension_method_get_error_string>`\ (\ result\: :ref:`int<class_int>`\ ) |
  43. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`int<class_int>` | :ref:`get_hand_tracker<class_OpenXRAPIExtension_method_get_hand_tracker>`\ (\ hand_index\: :ref:`int<class_int>`\ ) |
  45. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`int<class_int>` | :ref:`get_instance<class_OpenXRAPIExtension_method_get_instance>`\ (\ ) |
  47. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`int<class_int>` | :ref:`get_instance_proc_addr<class_OpenXRAPIExtension_method_get_instance_proc_addr>`\ (\ name\: :ref:`String<class_String>`\ ) |
  49. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`int<class_int>` | :ref:`get_next_frame_time<class_OpenXRAPIExtension_method_get_next_frame_time>`\ (\ ) |
  51. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`int<class_int>` | :ref:`get_play_space<class_OpenXRAPIExtension_method_get_play_space>`\ (\ ) |
  53. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`int<class_int>` | :ref:`get_predicted_display_time<class_OpenXRAPIExtension_method_get_predicted_display_time>`\ (\ ) |
  55. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`int<class_int>` | :ref:`get_projection_layer<class_OpenXRAPIExtension_method_get_projection_layer>`\ (\ ) |
  57. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`float<class_float>` | :ref:`get_render_state_z_far<class_OpenXRAPIExtension_method_get_render_state_z_far>`\ (\ ) |
  59. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`float<class_float>` | :ref:`get_render_state_z_near<class_OpenXRAPIExtension_method_get_render_state_z_near>`\ (\ ) |
  61. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`int<class_int>` | :ref:`get_session<class_OpenXRAPIExtension_method_get_session>`\ (\ ) |
  63. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`get_supported_swapchain_formats<class_OpenXRAPIExtension_method_get_supported_swapchain_formats>`\ (\ ) |
  65. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`String<class_String>` | :ref:`get_swapchain_format_name<class_OpenXRAPIExtension_method_get_swapchain_format_name>`\ (\ swapchain_format\: :ref:`int<class_int>`\ ) |
  67. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`int<class_int>` | :ref:`get_system_id<class_OpenXRAPIExtension_method_get_system_id>`\ (\ ) |
  69. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | |void| | :ref:`insert_debug_label<class_OpenXRAPIExtension_method_insert_debug_label>`\ (\ label_name\: :ref:`String<class_String>`\ ) |
  71. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`OpenXRAlphaBlendModeSupport<enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport>` | :ref:`is_environment_blend_mode_alpha_supported<class_OpenXRAPIExtension_method_is_environment_blend_mode_alpha_supported>`\ (\ ) |
  73. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`bool<class_bool>` | :ref:`is_initialized<class_OpenXRAPIExtension_method_is_initialized>`\ (\ ) |
  75. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`bool<class_bool>` | :ref:`is_running<class_OpenXRAPIExtension_method_is_running>`\ (\ ) |
  77. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`bool<class_bool>` | :ref:`openxr_is_enabled<class_OpenXRAPIExtension_method_openxr_is_enabled>`\ (\ check_run_in_editor\: :ref:`bool<class_bool>`\ ) |static| |
  79. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | |void| | :ref:`openxr_swapchain_acquire<class_OpenXRAPIExtension_method_openxr_swapchain_acquire>`\ (\ swapchain\: :ref:`int<class_int>`\ ) |
  81. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`int<class_int>` | :ref:`openxr_swapchain_create<class_OpenXRAPIExtension_method_openxr_swapchain_create>`\ (\ create_flags\: :ref:`int<class_int>`, usage_flags\: :ref:`int<class_int>`, swapchain_format\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, sample_count\: :ref:`int<class_int>`, array_size\: :ref:`int<class_int>`\ ) |
  83. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | |void| | :ref:`openxr_swapchain_free<class_OpenXRAPIExtension_method_openxr_swapchain_free>`\ (\ swapchain\: :ref:`int<class_int>`\ ) |
  85. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`RID<class_RID>` | :ref:`openxr_swapchain_get_image<class_OpenXRAPIExtension_method_openxr_swapchain_get_image>`\ (\ swapchain\: :ref:`int<class_int>`\ ) |
  87. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`int<class_int>` | :ref:`openxr_swapchain_get_swapchain<class_OpenXRAPIExtension_method_openxr_swapchain_get_swapchain>`\ (\ swapchain\: :ref:`int<class_int>`\ ) |
  89. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | |void| | :ref:`openxr_swapchain_release<class_OpenXRAPIExtension_method_openxr_swapchain_release>`\ (\ swapchain\: :ref:`int<class_int>`\ ) |
  91. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | |void| | :ref:`register_composition_layer_provider<class_OpenXRAPIExtension_method_register_composition_layer_provider>`\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension<class_OpenXRExtensionWrapperExtension>`\ ) |
  93. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | |void| | :ref:`register_projection_views_extension<class_OpenXRAPIExtension_method_register_projection_views_extension>`\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension<class_OpenXRExtensionWrapperExtension>`\ ) |
  95. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | |void| | :ref:`set_emulate_environment_blend_mode_alpha_blend<class_OpenXRAPIExtension_method_set_emulate_environment_blend_mode_alpha_blend>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |
  97. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | |void| | :ref:`set_object_name<class_OpenXRAPIExtension_method_set_object_name>`\ (\ object_type\: :ref:`int<class_int>`, object_handle\: :ref:`int<class_int>`, object_name\: :ref:`String<class_String>`\ ) |
  99. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | |void| | :ref:`set_render_region<class_OpenXRAPIExtension_method_set_render_region>`\ (\ render_region\: :ref:`Rect2i<class_Rect2i>`\ ) |
  101. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | |void| | :ref:`set_velocity_depth_texture<class_OpenXRAPIExtension_method_set_velocity_depth_texture>`\ (\ render_target\: :ref:`RID<class_RID>`\ ) |
  103. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | |void| | :ref:`set_velocity_target_size<class_OpenXRAPIExtension_method_set_velocity_target_size>`\ (\ target_size\: :ref:`Vector2i<class_Vector2i>`\ ) |
  105. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | |void| | :ref:`set_velocity_texture<class_OpenXRAPIExtension_method_set_velocity_texture>`\ (\ render_target\: :ref:`RID<class_RID>`\ ) |
  107. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`Transform3D<class_Transform3D>` | :ref:`transform_from_pose<class_OpenXRAPIExtension_method_transform_from_pose>`\ (\ pose\: ``const void*``\ ) |
  109. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | |void| | :ref:`unregister_composition_layer_provider<class_OpenXRAPIExtension_method_unregister_composition_layer_provider>`\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension<class_OpenXRExtensionWrapperExtension>`\ ) |
  111. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | |void| | :ref:`unregister_projection_views_extension<class_OpenXRAPIExtension_method_unregister_projection_views_extension>`\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension<class_OpenXRExtensionWrapperExtension>`\ ) |
  113. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`bool<class_bool>` | :ref:`xr_result<class_OpenXRAPIExtension_method_xr_result>`\ (\ result\: :ref:`int<class_int>`, format\: :ref:`String<class_String>`, args\: :ref:`Array<class_Array>`\ ) |
  115. +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. .. rst-class:: classref-section-separator
  117. ----
  118. .. rst-class:: classref-descriptions-group
  119. Enumerations
  120. ------------
  121. .. _enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport:
  122. .. rst-class:: classref-enumeration
  123. enum **OpenXRAlphaBlendModeSupport**: :ref:`๐Ÿ”—<enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport>`
  124. .. _class_OpenXRAPIExtension_constant_OPENXR_ALPHA_BLEND_MODE_SUPPORT_NONE:
  125. .. rst-class:: classref-enumeration-constant
  126. :ref:`OpenXRAlphaBlendModeSupport<enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport>` **OPENXR_ALPHA_BLEND_MODE_SUPPORT_NONE** = ``0``
  127. Means that :ref:`XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND<class_XRInterface_constant_XR_ENV_BLEND_MODE_ALPHA_BLEND>` isn't supported at all.
  128. .. _class_OpenXRAPIExtension_constant_OPENXR_ALPHA_BLEND_MODE_SUPPORT_REAL:
  129. .. rst-class:: classref-enumeration-constant
  130. :ref:`OpenXRAlphaBlendModeSupport<enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport>` **OPENXR_ALPHA_BLEND_MODE_SUPPORT_REAL** = ``1``
  131. Means that :ref:`XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND<class_XRInterface_constant_XR_ENV_BLEND_MODE_ALPHA_BLEND>` is really supported.
  132. .. _class_OpenXRAPIExtension_constant_OPENXR_ALPHA_BLEND_MODE_SUPPORT_EMULATING:
  133. .. rst-class:: classref-enumeration-constant
  134. :ref:`OpenXRAlphaBlendModeSupport<enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport>` **OPENXR_ALPHA_BLEND_MODE_SUPPORT_EMULATING** = ``2``
  135. Means that :ref:`XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND<class_XRInterface_constant_XR_ENV_BLEND_MODE_ALPHA_BLEND>` is emulated.
  136. .. rst-class:: classref-section-separator
  137. ----
  138. .. rst-class:: classref-descriptions-group
  139. Method Descriptions
  140. -------------------
  141. .. _class_OpenXRAPIExtension_method_action_get_handle:
  142. .. rst-class:: classref-method
  143. :ref:`int<class_int>` **action_get_handle**\ (\ action\: :ref:`RID<class_RID>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_action_get_handle>`
  144. Returns the corresponding ``XrAction`` OpenXR handle for the given action RID.
  145. .. rst-class:: classref-item-separator
  146. ----
  147. .. _class_OpenXRAPIExtension_method_begin_debug_label_region:
  148. .. rst-class:: classref-method
  149. |void| **begin_debug_label_region**\ (\ label_name\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_begin_debug_label_region>`
  150. Begins a new debug label region, this label will be reported in debug messages for any calls following this until :ref:`end_debug_label_region()<class_OpenXRAPIExtension_method_end_debug_label_region>` is called. Debug labels can be stacked.
  151. .. rst-class:: classref-item-separator
  152. ----
  153. .. _class_OpenXRAPIExtension_method_can_render:
  154. .. rst-class:: classref-method
  155. :ref:`bool<class_bool>` **can_render**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_can_render>`
  156. Returns ``true`` if OpenXR is initialized for rendering with an XR viewport.
  157. .. rst-class:: classref-item-separator
  158. ----
  159. .. _class_OpenXRAPIExtension_method_end_debug_label_region:
  160. .. rst-class:: classref-method
  161. |void| **end_debug_label_region**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_end_debug_label_region>`
  162. Marks the end of a debug label region. Removes the latest debug label region added by calling :ref:`begin_debug_label_region()<class_OpenXRAPIExtension_method_begin_debug_label_region>`.
  163. .. rst-class:: classref-item-separator
  164. ----
  165. .. _class_OpenXRAPIExtension_method_find_action:
  166. .. rst-class:: classref-method
  167. :ref:`RID<class_RID>` **find_action**\ (\ name\: :ref:`String<class_String>`, action_set\: :ref:`RID<class_RID>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_find_action>`
  168. Returns the :ref:`RID<class_RID>` corresponding to an ``Action`` of a matching name, optionally limited to a specified action set.
  169. .. rst-class:: classref-item-separator
  170. ----
  171. .. _class_OpenXRAPIExtension_method_get_error_string:
  172. .. rst-class:: classref-method
  173. :ref:`String<class_String>` **get_error_string**\ (\ result\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_get_error_string>`
  174. Returns an error string for the given `XrResult <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html>`__.
  175. .. rst-class:: classref-item-separator
  176. ----
  177. .. _class_OpenXRAPIExtension_method_get_hand_tracker:
  178. .. rst-class:: classref-method
  179. :ref:`int<class_int>` **get_hand_tracker**\ (\ hand_index\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_get_hand_tracker>`
  180. Returns the corresponding ``XRHandTrackerEXT`` handle for the given hand index value.
  181. .. rst-class:: classref-item-separator
  182. ----
  183. .. _class_OpenXRAPIExtension_method_get_instance:
  184. .. rst-class:: classref-method
  185. :ref:`int<class_int>` **get_instance**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_get_instance>`
  186. Returns the `XrInstance <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrInstance.html>`__ created during the initialization of the OpenXR API.
  187. .. rst-class:: classref-item-separator
  188. ----
  189. .. _class_OpenXRAPIExtension_method_get_instance_proc_addr:
  190. .. rst-class:: classref-method
  191. :ref:`int<class_int>` **get_instance_proc_addr**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_get_instance_proc_addr>`
  192. Returns the function pointer of the OpenXR function with the specified name, cast to an integer. If the function with the given name does not exist, the method returns ``0``.
  193. \ **Note:** ``openxr/util.h`` contains utility macros for acquiring OpenXR functions, e.g. ``GDEXTENSION_INIT_XR_FUNC_V(xrCreateAction)``.
  194. .. rst-class:: classref-item-separator
  195. ----
  196. .. _class_OpenXRAPIExtension_method_get_next_frame_time:
  197. .. rst-class:: classref-method
  198. :ref:`int<class_int>` **get_next_frame_time**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_get_next_frame_time>`
  199. Returns the predicted display timing for the next frame.
  200. .. rst-class:: classref-item-separator
  201. ----
  202. .. _class_OpenXRAPIExtension_method_get_play_space:
  203. .. rst-class:: classref-method
  204. :ref:`int<class_int>` **get_play_space**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_get_play_space>`
  205. Returns the play space, which is an `XrSpace <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSpace.html>`__ cast to an integer.
  206. .. rst-class:: classref-item-separator
  207. ----
  208. .. _class_OpenXRAPIExtension_method_get_predicted_display_time:
  209. .. rst-class:: classref-method
  210. :ref:`int<class_int>` **get_predicted_display_time**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_get_predicted_display_time>`
  211. Returns the predicted display timing for the current frame.
  212. .. rst-class:: classref-item-separator
  213. ----
  214. .. _class_OpenXRAPIExtension_method_get_projection_layer:
  215. .. rst-class:: classref-method
  216. :ref:`int<class_int>` **get_projection_layer**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_get_projection_layer>`
  217. Returns a pointer to the render state's ``XrCompositionLayerProjection`` struct.
  218. \ **Note:** This method should only be called from the rendering thread.
  219. .. rst-class:: classref-item-separator
  220. ----
  221. .. _class_OpenXRAPIExtension_method_get_render_state_z_far:
  222. .. rst-class:: classref-method
  223. :ref:`float<class_float>` **get_render_state_z_far**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_get_render_state_z_far>`
  224. Returns the far boundary value of the camera frustum.
  225. \ **Note:** This is only accessible in the render thread.
  226. .. rst-class:: classref-item-separator
  227. ----
  228. .. _class_OpenXRAPIExtension_method_get_render_state_z_near:
  229. .. rst-class:: classref-method
  230. :ref:`float<class_float>` **get_render_state_z_near**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_get_render_state_z_near>`
  231. Returns the near boundary value of the camera frustum.
  232. \ **Note:** This is only accessible in the render thread.
  233. .. rst-class:: classref-item-separator
  234. ----
  235. .. _class_OpenXRAPIExtension_method_get_session:
  236. .. rst-class:: classref-method
  237. :ref:`int<class_int>` **get_session**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_get_session>`
  238. Returns the OpenXR session, which is an `XrSession <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSession.html>`__ cast to an integer.
  239. .. rst-class:: classref-item-separator
  240. ----
  241. .. _class_OpenXRAPIExtension_method_get_supported_swapchain_formats:
  242. .. rst-class:: classref-method
  243. :ref:`PackedInt64Array<class_PackedInt64Array>` **get_supported_swapchain_formats**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_get_supported_swapchain_formats>`
  244. Returns an array of supported swapchain formats.
  245. .. rst-class:: classref-item-separator
  246. ----
  247. .. _class_OpenXRAPIExtension_method_get_swapchain_format_name:
  248. .. rst-class:: classref-method
  249. :ref:`String<class_String>` **get_swapchain_format_name**\ (\ swapchain_format\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_get_swapchain_format_name>`
  250. Returns the name of the specified swapchain format.
  251. .. rst-class:: classref-item-separator
  252. ----
  253. .. _class_OpenXRAPIExtension_method_get_system_id:
  254. .. rst-class:: classref-method
  255. :ref:`int<class_int>` **get_system_id**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_get_system_id>`
  256. Returns the id of the system, which is a `XrSystemId <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSystemId.html>`__ cast to an integer.
  257. .. rst-class:: classref-item-separator
  258. ----
  259. .. _class_OpenXRAPIExtension_method_insert_debug_label:
  260. .. rst-class:: classref-method
  261. |void| **insert_debug_label**\ (\ label_name\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_insert_debug_label>`
  262. Inserts a debug label, this label is reported in any debug message resulting from the OpenXR calls that follows, until any of :ref:`begin_debug_label_region()<class_OpenXRAPIExtension_method_begin_debug_label_region>`, :ref:`end_debug_label_region()<class_OpenXRAPIExtension_method_end_debug_label_region>`, or :ref:`insert_debug_label()<class_OpenXRAPIExtension_method_insert_debug_label>` is called.
  263. .. rst-class:: classref-item-separator
  264. ----
  265. .. _class_OpenXRAPIExtension_method_is_environment_blend_mode_alpha_supported:
  266. .. rst-class:: classref-method
  267. :ref:`OpenXRAlphaBlendModeSupport<enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport>` **is_environment_blend_mode_alpha_supported**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_is_environment_blend_mode_alpha_supported>`
  268. Returns :ref:`OpenXRAlphaBlendModeSupport<enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport>` denoting if :ref:`XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND<class_XRInterface_constant_XR_ENV_BLEND_MODE_ALPHA_BLEND>` is really supported, emulated or not supported at all.
  269. .. rst-class:: classref-item-separator
  270. ----
  271. .. _class_OpenXRAPIExtension_method_is_initialized:
  272. .. rst-class:: classref-method
  273. :ref:`bool<class_bool>` **is_initialized**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_is_initialized>`
  274. Returns ``true`` if OpenXR is initialized.
  275. .. rst-class:: classref-item-separator
  276. ----
  277. .. _class_OpenXRAPIExtension_method_is_running:
  278. .. rst-class:: classref-method
  279. :ref:`bool<class_bool>` **is_running**\ (\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_is_running>`
  280. Returns ``true`` if OpenXR is running (`xrBeginSession <https://registry.khronos.org/OpenXR/specs/1.0/man/html/xrBeginSession.html>`__ was successfully called and the swapchains were created).
  281. .. rst-class:: classref-item-separator
  282. ----
  283. .. _class_OpenXRAPIExtension_method_openxr_is_enabled:
  284. .. rst-class:: classref-method
  285. :ref:`bool<class_bool>` **openxr_is_enabled**\ (\ check_run_in_editor\: :ref:`bool<class_bool>`\ ) |static| :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_openxr_is_enabled>`
  286. Returns ``true`` if OpenXR is enabled.
  287. .. rst-class:: classref-item-separator
  288. ----
  289. .. _class_OpenXRAPIExtension_method_openxr_swapchain_acquire:
  290. .. rst-class:: classref-method
  291. |void| **openxr_swapchain_acquire**\ (\ swapchain\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_openxr_swapchain_acquire>`
  292. Acquires the image of the provided swapchain.
  293. .. rst-class:: classref-item-separator
  294. ----
  295. .. _class_OpenXRAPIExtension_method_openxr_swapchain_create:
  296. .. rst-class:: classref-method
  297. :ref:`int<class_int>` **openxr_swapchain_create**\ (\ create_flags\: :ref:`int<class_int>`, usage_flags\: :ref:`int<class_int>`, swapchain_format\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, sample_count\: :ref:`int<class_int>`, array_size\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_openxr_swapchain_create>`
  298. Returns a pointer to a new swapchain created using the provided parameters.
  299. .. rst-class:: classref-item-separator
  300. ----
  301. .. _class_OpenXRAPIExtension_method_openxr_swapchain_free:
  302. .. rst-class:: classref-method
  303. |void| **openxr_swapchain_free**\ (\ swapchain\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_openxr_swapchain_free>`
  304. Destroys the provided swapchain and frees it from memory.
  305. .. rst-class:: classref-item-separator
  306. ----
  307. .. _class_OpenXRAPIExtension_method_openxr_swapchain_get_image:
  308. .. rst-class:: classref-method
  309. :ref:`RID<class_RID>` **openxr_swapchain_get_image**\ (\ swapchain\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_openxr_swapchain_get_image>`
  310. Returns the RID of the provided swapchain's image.
  311. .. rst-class:: classref-item-separator
  312. ----
  313. .. _class_OpenXRAPIExtension_method_openxr_swapchain_get_swapchain:
  314. .. rst-class:: classref-method
  315. :ref:`int<class_int>` **openxr_swapchain_get_swapchain**\ (\ swapchain\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_openxr_swapchain_get_swapchain>`
  316. Returns the ``XrSwapchain`` handle of the provided swapchain.
  317. .. rst-class:: classref-item-separator
  318. ----
  319. .. _class_OpenXRAPIExtension_method_openxr_swapchain_release:
  320. .. rst-class:: classref-method
  321. |void| **openxr_swapchain_release**\ (\ swapchain\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_openxr_swapchain_release>`
  322. Releases the image of the provided swapchain.
  323. .. rst-class:: classref-item-separator
  324. ----
  325. .. _class_OpenXRAPIExtension_method_register_composition_layer_provider:
  326. .. rst-class:: classref-method
  327. |void| **register_composition_layer_provider**\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension<class_OpenXRExtensionWrapperExtension>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_register_composition_layer_provider>`
  328. Registers the given extension as a composition layer provider.
  329. .. rst-class:: classref-item-separator
  330. ----
  331. .. _class_OpenXRAPIExtension_method_register_projection_views_extension:
  332. .. rst-class:: classref-method
  333. |void| **register_projection_views_extension**\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension<class_OpenXRExtensionWrapperExtension>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_register_projection_views_extension>`
  334. Registers the given extension as a provider of additional data structures to projections views.
  335. .. rst-class:: classref-item-separator
  336. ----
  337. .. _class_OpenXRAPIExtension_method_set_emulate_environment_blend_mode_alpha_blend:
  338. .. rst-class:: classref-method
  339. |void| **set_emulate_environment_blend_mode_alpha_blend**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_set_emulate_environment_blend_mode_alpha_blend>`
  340. If set to ``true``, an OpenXR extension is loaded which is capable of emulating the :ref:`XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND<class_XRInterface_constant_XR_ENV_BLEND_MODE_ALPHA_BLEND>` blend mode.
  341. .. rst-class:: classref-item-separator
  342. ----
  343. .. _class_OpenXRAPIExtension_method_set_object_name:
  344. .. rst-class:: classref-method
  345. |void| **set_object_name**\ (\ object_type\: :ref:`int<class_int>`, object_handle\: :ref:`int<class_int>`, object_name\: :ref:`String<class_String>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_set_object_name>`
  346. Set the object name of an OpenXR object, used for debug output. ``object_type`` must be a valid OpenXR ``XrObjectType`` enum and ``object_handle`` must be a valid OpenXR object handle.
  347. .. rst-class:: classref-item-separator
  348. ----
  349. .. _class_OpenXRAPIExtension_method_set_render_region:
  350. .. rst-class:: classref-method
  351. |void| **set_render_region**\ (\ render_region\: :ref:`Rect2i<class_Rect2i>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_set_render_region>`
  352. Sets the render region to ``render_region``, overriding the normal render target's rect.
  353. .. rst-class:: classref-item-separator
  354. ----
  355. .. _class_OpenXRAPIExtension_method_set_velocity_depth_texture:
  356. .. rst-class:: classref-method
  357. |void| **set_velocity_depth_texture**\ (\ render_target\: :ref:`RID<class_RID>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_set_velocity_depth_texture>`
  358. Sets the render target of the velocity depth texture.
  359. .. rst-class:: classref-item-separator
  360. ----
  361. .. _class_OpenXRAPIExtension_method_set_velocity_target_size:
  362. .. rst-class:: classref-method
  363. |void| **set_velocity_target_size**\ (\ target_size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_set_velocity_target_size>`
  364. Sets the target size of the velocity and velocity depth textures.
  365. .. rst-class:: classref-item-separator
  366. ----
  367. .. _class_OpenXRAPIExtension_method_set_velocity_texture:
  368. .. rst-class:: classref-method
  369. |void| **set_velocity_texture**\ (\ render_target\: :ref:`RID<class_RID>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_set_velocity_texture>`
  370. Sets the render target of the velocity texture.
  371. .. rst-class:: classref-item-separator
  372. ----
  373. .. _class_OpenXRAPIExtension_method_transform_from_pose:
  374. .. rst-class:: classref-method
  375. :ref:`Transform3D<class_Transform3D>` **transform_from_pose**\ (\ pose\: ``const void*``\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_transform_from_pose>`
  376. Creates a :ref:`Transform3D<class_Transform3D>` from an `XrPosef <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrPosef.html>`__.
  377. .. rst-class:: classref-item-separator
  378. ----
  379. .. _class_OpenXRAPIExtension_method_unregister_composition_layer_provider:
  380. .. rst-class:: classref-method
  381. |void| **unregister_composition_layer_provider**\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension<class_OpenXRExtensionWrapperExtension>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_unregister_composition_layer_provider>`
  382. Unregisters the given extension as a composition layer provider.
  383. .. rst-class:: classref-item-separator
  384. ----
  385. .. _class_OpenXRAPIExtension_method_unregister_projection_views_extension:
  386. .. rst-class:: classref-method
  387. |void| **unregister_projection_views_extension**\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension<class_OpenXRExtensionWrapperExtension>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_unregister_projection_views_extension>`
  388. Unregisters the given extension as a provider of additional data structures to projections views.
  389. .. rst-class:: classref-item-separator
  390. ----
  391. .. _class_OpenXRAPIExtension_method_xr_result:
  392. .. rst-class:: classref-method
  393. :ref:`bool<class_bool>` **xr_result**\ (\ result\: :ref:`int<class_int>`, format\: :ref:`String<class_String>`, args\: :ref:`Array<class_Array>`\ ) :ref:`๐Ÿ”—<class_OpenXRAPIExtension_method_xr_result>`
  394. Returns ``true`` if the provided `XrResult <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html>`__ (cast to an integer) is successful. Otherwise returns ``false`` and prints the `XrResult <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html>`__ converted to a string, with the specified additional information.
  395. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  396. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  397. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  398. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  399. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  400. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  401. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  402. .. |void| replace:: :abbr:`void (No return value.)`