You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-02 16:48:55 +00:00
Add OpenXR 1.1 support
This commit is contained in:
@@ -60,12 +60,15 @@ protected:
|
||||
|
||||
public:
|
||||
// `get_requested_extensions` should return a list of OpenXR extensions related to this extension.
|
||||
// This function can be called multiple times.
|
||||
// p_xr_version is the OpenXR version which we're attempting to initialize.
|
||||
// Note: when called from the editor, p_xr_version will be 0 and we should return any extension we may initialize.
|
||||
// If the bool * is a nullptr this extension is mandatory
|
||||
// If the bool * points to a boolean, the boolean will be updated
|
||||
// to true if the extension is enabled.
|
||||
virtual HashMap<String, bool *> get_requested_extensions();
|
||||
virtual HashMap<String, bool *> get_requested_extensions(XrVersion p_xr_version);
|
||||
|
||||
GDVIRTUAL0R(Dictionary, _get_requested_extensions);
|
||||
GDVIRTUAL1R(Dictionary, _get_requested_extensions, uint64_t);
|
||||
|
||||
// These functions allow an extension to add entries to a struct chain.
|
||||
// `p_next_pointer` points to the last struct that was created for this chain
|
||||
@@ -74,7 +77,7 @@ public:
|
||||
// If you are not adding any structs, just return `p_next_pointer`.
|
||||
// See existing extensions for examples of this implementation.
|
||||
virtual void *set_system_properties_and_get_next_pointer(void *p_next_pointer); // Add additional data structures when we interrogate OpenXR's system abilities.
|
||||
virtual void *set_instance_create_info_and_get_next_pointer(void *p_next_pointer); // Add additional data structures when we create our OpenXR instance.
|
||||
virtual void *set_instance_create_info_and_get_next_pointer(XrVersion p_xr_version, void *p_next_pointer); // Add additional data structures when we create our OpenXR instance.
|
||||
virtual void *set_session_create_and_get_next_pointer(void *p_next_pointer); // Add additional data structures when we create our OpenXR session.
|
||||
virtual void *set_swapchain_create_info_and_get_next_pointer(void *p_next_pointer); // Add additional data structures when creating OpenXR swap chains.
|
||||
virtual void *set_hand_joint_locations_and_get_next_pointer(int p_hand_index, void *p_next_pointer);
|
||||
@@ -91,7 +94,7 @@ public:
|
||||
|
||||
//TODO workaround as GDExtensionPtr<void> return type results in build error in godot-cpp
|
||||
GDVIRTUAL1R(uint64_t, _set_system_properties_and_get_next_pointer, GDExtensionPtr<void>);
|
||||
GDVIRTUAL1R(uint64_t, _set_instance_create_info_and_get_next_pointer, GDExtensionPtr<void>);
|
||||
GDVIRTUAL2R(uint64_t, _set_instance_create_info_and_get_next_pointer, uint64_t, GDExtensionPtr<void>);
|
||||
GDVIRTUAL1R(uint64_t, _set_session_create_and_get_next_pointer, GDExtensionPtr<void>);
|
||||
GDVIRTUAL1R(uint64_t, _set_swapchain_create_info_and_get_next_pointer, GDExtensionPtr<void>);
|
||||
GDVIRTUAL2R(uint64_t, _set_hand_joint_locations_and_get_next_pointer, int, GDExtensionPtr<void>);
|
||||
@@ -107,6 +110,11 @@ public:
|
||||
GDVIRTUAL2R(uint64_t, _set_view_configuration_and_get_next_pointer, uint32_t, GDExtensionPtr<void>);
|
||||
GDVIRTUAL1C(_print_view_configuration_info, int);
|
||||
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
GDVIRTUAL0R_COMPAT(_get_requested_extensions_bind_compat_109302, Dictionary, _get_requested_extensions);
|
||||
GDVIRTUAL1R_COMPAT(_set_instance_create_info_and_get_next_pointer_bind_compat_109302, uint64_t, _set_instance_create_info_and_get_next_pointer, GDExtensionPtr<void>);
|
||||
#endif
|
||||
|
||||
virtual PackedStringArray get_suggested_tracker_names();
|
||||
|
||||
GDVIRTUAL0R(PackedStringArray, _get_suggested_tracker_names);
|
||||
|
||||
Reference in New Issue
Block a user