diff options
Diffstat (limited to 'modules/openxr/extensions/openxr_fb_passthrough_extension_wrapper.h')
-rw-r--r-- | modules/openxr/extensions/openxr_fb_passthrough_extension_wrapper.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/modules/openxr/extensions/openxr_fb_passthrough_extension_wrapper.h b/modules/openxr/extensions/openxr_fb_passthrough_extension_wrapper.h index 1959f3fdc4..7df59c765e 100644 --- a/modules/openxr/extensions/openxr_fb_passthrough_extension_wrapper.h +++ b/modules/openxr/extensions/openxr_fb_passthrough_extension_wrapper.h @@ -43,9 +43,12 @@ class Viewport; // Wrapper for the set of Facebook XR passthrough extensions. class OpenXRFbPassthroughExtensionWrapper : public OpenXRExtensionWrapper, public OpenXRCompositionLayerProvider { - friend class OpenXRAPI; - public: + OpenXRFbPassthroughExtensionWrapper(); + ~OpenXRFbPassthroughExtensionWrapper(); + + virtual HashMap<String, bool *> get_requested_extensions() override; + void on_instance_created(const XrInstance instance) override; void on_session_created(const XrSession session) override; @@ -68,10 +71,6 @@ public: static OpenXRFbPassthroughExtensionWrapper *get_singleton(); -protected: - OpenXRFbPassthroughExtensionWrapper(OpenXRAPI *p_openxr_api); - ~OpenXRFbPassthroughExtensionWrapper(); - private: // Create a passthrough feature EXT_PROTO_XRRESULT_FUNC3(xrCreatePassthroughFB, @@ -208,7 +207,7 @@ private: // returned even when the operation is valid on Meta Quest devices. // The issue should be addressed on that platform in OS release v37. inline bool is_valid_passthrough_result(XrResult result, const char *format) { - return openxr_api->xr_result(result, format) || result == XR_ERROR_UNEXPECTED_STATE_PASSTHROUGH_FB; + return OpenXRAPI::get_singleton()->xr_result(result, format) || result == XR_ERROR_UNEXPECTED_STATE_PASSTHROUGH_FB; } Viewport *get_main_viewport(); @@ -234,12 +233,6 @@ private: XR_PASSTHROUGH_IS_RUNNING_AT_CREATION_BIT_FB, XR_PASSTHROUGH_LAYER_PURPOSE_RECONSTRUCTION_FB, }; - XrPassthroughStyleFB passthrough_layer_style = { - XR_TYPE_PASSTHROUGH_STYLE_FB, - nullptr, - 1, - { 0, 0, 0, 0 }, - }; XrPassthroughLayerFB passthrough_layer = XR_NULL_HANDLE; XrCompositionLayerPassthroughFB composition_passthrough_layer = { |