diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-25 11:13:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 11:13:27 +0200 |
commit | 3084a48ace3e7dabd83e4c62280328f429defad6 (patch) | |
tree | 1390e9c68aea9b9ab8802b8e3d82605997f7eb95 /modules/webxr | |
parent | cc09dc92c8ee06255a158d81533d35c6d2e8d31e (diff) | |
parent | 455c06ecd466424cdf1b444a7c289b322390e795 (diff) |
Merge pull request #63219 from reduz/implement-vector4-projection
Diffstat (limited to 'modules/webxr')
-rw-r--r-- | modules/webxr/webxr_interface_js.cpp | 4 | ||||
-rw-r--r-- | modules/webxr/webxr_interface_js.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/webxr/webxr_interface_js.cpp b/modules/webxr/webxr_interface_js.cpp index 74e744402b..07e6760555 100644 --- a/modules/webxr/webxr_interface_js.cpp +++ b/modules/webxr/webxr_interface_js.cpp @@ -363,8 +363,8 @@ Transform3D WebXRInterfaceJS::get_transform_for_view(uint32_t p_view, const Tran return p_cam_transform * xr_server->get_reference_frame() * transform_for_eye; }; -CameraMatrix WebXRInterfaceJS::get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) { - CameraMatrix eye; +Projection WebXRInterfaceJS::get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) { + Projection eye; float *js_matrix = godot_webxr_get_projection_for_eye(p_view + 1); if (!initialized || js_matrix == nullptr) { diff --git a/modules/webxr/webxr_interface_js.h b/modules/webxr/webxr_interface_js.h index 31858194f6..f1ffedba46 100644 --- a/modules/webxr/webxr_interface_js.h +++ b/modules/webxr/webxr_interface_js.h @@ -87,7 +87,7 @@ public: virtual uint32_t get_view_count() override; virtual Transform3D get_camera_transform() override; virtual Transform3D get_transform_for_view(uint32_t p_view, const Transform3D &p_cam_transform) override; - virtual CameraMatrix get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) override; + virtual Projection get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) override; virtual Vector<BlitToScreen> post_draw_viewport(RID p_render_target, const Rect2 &p_screen_rect) override; virtual void process() override; |