diff options
author | Bastiaan Olij <mux213@gmail.com> | 2023-03-13 12:26:10 +1100 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2023-03-15 13:11:48 +1100 |
commit | e31c2e42774f0b56608662f239a32f7734513a99 (patch) | |
tree | 78b91f39cd216580746724b5ffdb7751d0ea1074 /modules/webxr | |
parent | 550a7798510810d238b733a54f69da71b2a2d152 (diff) | |
download | redot-engine-e31c2e42774f0b56608662f239a32f7734513a99.tar.gz |
Add a get_system_info method to XRInterface
Diffstat (limited to 'modules/webxr')
-rw-r--r-- | modules/webxr/webxr_interface_js.cpp | 10 | ||||
-rw-r--r-- | modules/webxr/webxr_interface_js.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/modules/webxr/webxr_interface_js.cpp b/modules/webxr/webxr_interface_js.cpp index 97b2eea4d7..d3710bd0df 100644 --- a/modules/webxr/webxr_interface_js.cpp +++ b/modules/webxr/webxr_interface_js.cpp @@ -301,6 +301,16 @@ void WebXRInterfaceJS::uninitialize() { }; }; +Dictionary WebXRInterfaceJS::get_system_info() { + Dictionary dict; + + // TODO get actual information from WebXR to return here + dict[SNAME("XRRuntimeName")] = String("WebXR"); + dict[SNAME("XRRuntimeVersion")] = String(""); + + return dict; +} + Transform3D WebXRInterfaceJS::_js_matrix_to_transform(float *p_js_matrix) { Transform3D transform; diff --git a/modules/webxr/webxr_interface_js.h b/modules/webxr/webxr_interface_js.h index 31d2e200c0..20516e89e2 100644 --- a/modules/webxr/webxr_interface_js.h +++ b/modules/webxr/webxr_interface_js.h @@ -108,6 +108,7 @@ public: virtual bool is_initialized() const override; virtual bool initialize() override; virtual void uninitialize() override; + virtual Dictionary get_system_info() override; virtual Size2 get_render_target_size() override; virtual uint32_t get_view_count() override; |