diff options
author | Gabor Koncz <gabor.koncz@migeran.com> | 2022-09-26 09:04:12 +0200 |
---|---|---|
committer | Gabor Koncz <gabor.koncz@migeran.com> | 2022-09-27 12:26:53 +0200 |
commit | 72203a4da40abbf9fbbdca9f9a55b0199b061991 (patch) | |
tree | 043608e0ab50ee4eaad969dfe524a3c8ee390346 /servers/xr | |
parent | 52aae6d4f11c1142cc644e43d116c3d80ebdd73b (diff) |
Add Passthrough extension wrapper
Diffstat (limited to 'servers/xr')
-rw-r--r-- | servers/xr/xr_interface.cpp | 5 | ||||
-rw-r--r-- | servers/xr/xr_interface.h | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/servers/xr/xr_interface.cpp b/servers/xr/xr_interface.cpp index 4b9ea40223..430a5bfd16 100644 --- a/servers/xr/xr_interface.cpp +++ b/servers/xr/xr_interface.cpp @@ -68,6 +68,11 @@ void XRInterface::_bind_methods() { ClassDB::bind_method(D_METHOD("set_anchor_detection_is_enabled", "enable"), &XRInterface::set_anchor_detection_is_enabled); ClassDB::bind_method(D_METHOD("get_camera_feed_id"), &XRInterface::get_camera_feed_id); + ClassDB::bind_method(D_METHOD("is_passthrough_supported"), &XRInterface::is_passthrough_supported); + ClassDB::bind_method(D_METHOD("is_passthrough_enabled"), &XRInterface::is_passthrough_enabled); + ClassDB::bind_method(D_METHOD("start_passthrough"), &XRInterface::start_passthrough); + ClassDB::bind_method(D_METHOD("stop_passthrough"), &XRInterface::stop_passthrough); + ADD_GROUP("AR", "ar_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ar_is_anchor_detection_enabled"), "set_anchor_detection_is_enabled", "get_anchor_detection_is_enabled"); diff --git a/servers/xr/xr_interface.h b/servers/xr/xr_interface.h index f11458f1cc..17ff5f8add 100644 --- a/servers/xr/xr_interface.h +++ b/servers/xr/xr_interface.h @@ -130,6 +130,13 @@ public: virtual Vector<BlitToScreen> post_draw_viewport(RID p_render_target, const Rect2 &p_screen_rect) = 0; /* inform XR interface we finished our viewport draw process */ virtual void end_frame(){}; + /** passthrough **/ + + virtual bool is_passthrough_supported() { return false; } + virtual bool is_passthrough_enabled() { return false; } + virtual bool start_passthrough() { return false; } + virtual void stop_passthrough() {} + virtual void notification(int p_what){}; XRInterface(); |