Makes the OpenXR API available for GDExtension.
OpenXRAPIExtension makes OpenXR available for GDExtension. It provides the OpenXR API to GDExtension through the get_instance_proc_addr() method, and the OpenXR instance through get_instance().
It also provides methods for querying the status of OpenXR initialization, and helper methods for ease of use of the API with GDExtension.
Begins a new debug label region, this label will be reported in debug messages for any calls following this until end_debug_label_region() is called. Debug labels can be stacked.
Marks the end of a debug label region. Removes the latest debug label region added by calling begin_debug_label_region().
Returns the RID corresponding to an Action of a matching name, optionally limited to a specified action set.
Returns the XrInstance created during the initialization of the OpenXR API.
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.
Note: openxr/util.h contains utility macros for acquiring OpenXR functions, e.g. GDEXTENSION_INIT_XR_FUNC_V(xrCreateAction).
Returns the version of OpenXR that was initialized. Only valid after the OpenXR instance has been created. See XR_MAKE_VERSION for how the version is calculated.
Returns a pointer to the render state's XrCompositionLayerProjection struct.
Note: This method should only be called from the rendering thread.
Returns the far boundary value of the camera frustum.
Note: This is only accessible in the render thread.
Returns the near boundary value of the camera frustum.
Note: This is only accessible in the render thread.
Returns the view configuration type, which is an XrViewConfigurationType cast to an integer.
Returns the number of views. It is usually two, one for each eye, but may differ with different view configurations.
Inserts a debug label, this label is reported in any debug message resulting from the OpenXR calls that follows, until any of begin_debug_label_region(), end_debug_label_region(), or insert_debug_label() is called.
Returns OpenXRAlphaBlendModeSupport denoting if XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND is really supported, emulated or not supported at all.
Returns true if OpenXR is running (xrBeginSession was successfully called and the swapchains were created).
Returns a pointer to a new swapchain created using the provided parameters.
Registers the given extension as a composition layer provider.
Note: This cannot be called after the OpenXR session has started. However, it can be called in OpenXRExtensionWrapper._on_session_created().
Registers the given extension as modifying frame info via the OpenXRExtensionWrapper._set_frame_wait_info_and_get_next_pointer(), OpenXRExtensionWrapper._set_view_locate_info_and_get_next_pointer(), or OpenXRExtensionWrapper._set_frame_end_info_and_get_next_pointer() virtual methods.
Note: This cannot be called after the OpenXR session has started. However, it can be called in OpenXRExtensionWrapper._on_session_created().
Registers the given extension as modifying XrCompositionLayerProjection via the OpenXRExtensionWrapper._set_projection_layer_and_get_next_pointer() virtual method.
Note: This cannot be called after the OpenXR session has started. However, it can be called in OpenXRExtensionWrapper._on_session_created().
Registers the given extension as a provider of additional data structures to projections views.
Note: This cannot be called after the OpenXR session has started. However, it can be called in OpenXRExtensionWrapper._on_session_created().
Sets the reference space used by OpenXR to the given XrSpace (cast to a void *).
If set to true, an OpenXR extension is loaded which is capable of emulating the XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND blend mode.
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.
Unregisters the given extension as a composition layer provider.
Note: This cannot be called while the OpenXR session is still running.
Unregisters the given extension as modifying frame info.
Note: This cannot be called while the OpenXR session is still running.
Unregisters the given extension as modifying XrCompositionLayerProjection.
Note: This cannot be called while the OpenXR session is still running.
Unregisters the given extension as a provider of additional data structures to projections views.
Note: This cannot be called while the OpenXR session is still running.
Request the recommended resolution from the OpenXR runtime and update the main swapchain size if it has changed.
OPENXR_ALPHA_BLEND_MODE_SUPPORT_NONE = 0Means that XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND isn't supported at all.
OPENXR_ALPHA_BLEND_MODE_SUPPORT_REAL = 1Means that XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND is really supported.
OPENXR_ALPHA_BLEND_MODE_SUPPORT_EMULATING = 2Means that XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND is emulated.