d600e6eb1b
This commit adds the classes OpenXRExtensionWrapperExtension and OpenXRAPIExtension that can be used in GDExtensions to define OpenXR extension wrappers. It modifies extension wrapper registration so that they can be registered before OpenXRAPI instantiation (e.g. in core level initialization of GDExtensions). Developed by Migeran (https://migeran.com)
168 lines
6.8 KiB
XML
168 lines
6.8 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="OpenXRExtensionWrapperExtension" inherits="Object" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
|
<brief_description>
|
|
Allows clients to implement OpenXR extensions with GDExtension.
|
|
</brief_description>
|
|
<description>
|
|
[OpenXRExtensionWrapperExtension] allows clients to implement OpenXR extensions with GDExtension. The extension should be registered with [method register_extension_wrapper].
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="_get_requested_extensions" qualifiers="virtual">
|
|
<return type="Dictionary" />
|
|
<description>
|
|
Returns a [Dictionary] of OpenXR extensions related to this extension. The [Dictionary] should contain the name of the extension, mapped to a [code]bool *[/code] cast to an integer:
|
|
- If the [code]bool *[/code] is a [code]nullptr[/code] this extension is mandatory.
|
|
- If the [code]bool *[/code] points to a boolean, the boolean will be updated to [code]true[/code] if the extension is enabled.
|
|
</description>
|
|
</method>
|
|
<method name="_on_before_instance_created" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called before the OpenXR instance is created.
|
|
</description>
|
|
</method>
|
|
<method name="_on_event_polled" qualifiers="virtual">
|
|
<return type="bool" />
|
|
<param index="0" name="event" type="const void*" />
|
|
<description>
|
|
Called when there is an OpenXR event to process. When implementing, return [code]true[/code] if the event was handled, return [code]false[/code] otherwise.
|
|
</description>
|
|
</method>
|
|
<method name="_on_instance_created" qualifiers="virtual">
|
|
<return type="void" />
|
|
<param index="0" name="instance" type="int" />
|
|
<description>
|
|
Called right after the OpenXR instance is created.
|
|
</description>
|
|
</method>
|
|
<method name="_on_instance_destroyed" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called right before the OpenXR instance is destroyed.
|
|
</description>
|
|
</method>
|
|
<method name="_on_pre_render" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called right before the XR viewports begin their rendering step.
|
|
</description>
|
|
</method>
|
|
<method name="_on_process" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called as part of the OpenXR process handling. This happens right before general and physics processing steps of the main loop. During this step controller data is queried and made available to game logic.
|
|
</description>
|
|
</method>
|
|
<method name="_on_register_metadata" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Allows extensions to register additional controller metadata. This function is called even when the OpenXR API is not constructed as the metadata needs to be available to the editor.
|
|
Extensions should also provide metadata regardless of whether they are supported on the host system. The controller data is used to setup action maps for users who may have access to the relevant hardware.
|
|
</description>
|
|
</method>
|
|
<method name="_on_session_created" qualifiers="virtual">
|
|
<return type="void" />
|
|
<param index="0" name="session" type="int" />
|
|
<description>
|
|
Called right after the OpenXR session is created.
|
|
</description>
|
|
</method>
|
|
<method name="_on_session_destroyed" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called right before the OpenXR session is destroyed.
|
|
</description>
|
|
</method>
|
|
<method name="_on_state_exiting" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called when the OpenXR session state is changed to exiting.
|
|
</description>
|
|
</method>
|
|
<method name="_on_state_focused" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called when the OpenXR session state is changed to focused. This state is the active state when the game runs.
|
|
</description>
|
|
</method>
|
|
<method name="_on_state_idle" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called when the OpenXR session state is changed to idle.
|
|
</description>
|
|
</method>
|
|
<method name="_on_state_loss_pending" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called when the OpenXR session state is changed to loss pending.
|
|
</description>
|
|
</method>
|
|
<method name="_on_state_ready" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called when the OpenXR session state is changed to ready. This means OpenXR is ready to set up the session.
|
|
</description>
|
|
</method>
|
|
<method name="_on_state_stopping" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called when the OpenXR session state is changed to stopping.
|
|
</description>
|
|
</method>
|
|
<method name="_on_state_synchronized" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called when the OpenXR session state is changed to synchronized. OpenXR also returns to this state when the application loses focus.
|
|
</description>
|
|
</method>
|
|
<method name="_on_state_visible" qualifiers="virtual">
|
|
<return type="void" />
|
|
<description>
|
|
Called when the OpenXR session state is changed to visible. This means OpenXR is now ready to receive frames.
|
|
</description>
|
|
</method>
|
|
<method name="_set_instance_create_info_and_get_next_pointer" qualifiers="virtual">
|
|
<return type="int" />
|
|
<param index="0" name="next_pointer" type="void*" />
|
|
<description>
|
|
Adds additional data structures when the OpenXR instance is created.
|
|
</description>
|
|
</method>
|
|
<method name="_set_session_create_and_get_next_pointer" qualifiers="virtual">
|
|
<return type="int" />
|
|
<param index="0" name="next_pointer" type="void*" />
|
|
<description>
|
|
Adds additional data structures when the OpenXR session is created.
|
|
</description>
|
|
</method>
|
|
<method name="_set_swapchain_create_info_and_get_next_pointer" qualifiers="virtual">
|
|
<return type="int" />
|
|
<param index="0" name="next_pointer" type="void*" />
|
|
<description>
|
|
Adds additional data structures when creating OpenXR swapchains.
|
|
</description>
|
|
</method>
|
|
<method name="_set_system_properties_and_get_next_pointer" qualifiers="virtual">
|
|
<return type="int" />
|
|
<param index="0" name="next_pointer" type="void*" />
|
|
<description>
|
|
Adds additional data structures when interogating OpenXR system abilities.
|
|
</description>
|
|
</method>
|
|
<method name="get_openxr_api">
|
|
<return type="OpenXRAPIExtension" />
|
|
<description>
|
|
Returns the created [OpenXRAPIExtension], which can be used to access the OpenXR API.
|
|
</description>
|
|
</method>
|
|
<method name="register_extension_wrapper">
|
|
<return type="void" />
|
|
<description>
|
|
Registers the extension. This should happen at core module initialization level.
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
</class>
|