mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Auto merge of #26458 - Manishearth:secondary-view, r=asajeffrey
Update webxr with secondary view support Blocked on https://github.com/servo/webxr/pull/171 , untested
This commit is contained in:
commit
bdfa6b0751
3 changed files with 12 additions and 4 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
@ -3841,7 +3841,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "openxr"
|
||||
version = "0.12.1"
|
||||
source = "git+https://github.com/servo/openxrs.git?branch=xr-msft#676c1f267a607bd8d2a3b984c49625b825c873d0"
|
||||
source = "git+https://github.com/servo/openxrs.git?branch=xr-msft#fd761bf95d62c26709f8589bd82b495cd8276c8f"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"libloading 0.6.1",
|
||||
|
@ -3852,7 +3852,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "openxr-sys"
|
||||
version = "0.8.1"
|
||||
source = "git+https://github.com/servo/openxrs.git?branch=xr-msft#676c1f267a607bd8d2a3b984c49625b825c873d0"
|
||||
source = "git+https://github.com/servo/openxrs.git?branch=xr-msft#fd761bf95d62c26709f8589bd82b495cd8276c8f"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"winapi",
|
||||
|
@ -6471,7 +6471,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webxr"
|
||||
version = "0.0.1"
|
||||
source = "git+https://github.com/servo/webxr#e30ebd848c4deb95833c2fea91d7d8d34f6d8ed8"
|
||||
source = "git+https://github.com/servo/webxr#51477cb33fdb3bf3d5cc8b5af9e547fad9d67319"
|
||||
dependencies = [
|
||||
"android_injected_glue",
|
||||
"bindgen",
|
||||
|
@ -6494,7 +6494,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webxr-api"
|
||||
version = "0.0.1"
|
||||
source = "git+https://github.com/servo/webxr#e30ebd848c4deb95833c2fea91d7d8d34f6d8ed8"
|
||||
source = "git+https://github.com/servo/webxr#51477cb33fdb3bf3d5cc8b5af9e547fad9d67319"
|
||||
dependencies = [
|
||||
"euclid",
|
||||
"ipc-channel",
|
||||
|
|
|
@ -57,6 +57,11 @@ impl XRViewerPose {
|
|||
views.push(XRView::new(global, session, &left, XREye::Left, &pose));
|
||||
views.push(XRView::new(global, session, &right, XREye::Right, &pose));
|
||||
},
|
||||
Views::StereoCapture(left, right, third_eye) => {
|
||||
views.push(XRView::new(global, session, &left, XREye::Left, &pose));
|
||||
views.push(XRView::new(global, session, &right, XREye::Right, &pose));
|
||||
views.push(XRView::new(global, session, &third_eye, XREye::None, &pose));
|
||||
},
|
||||
});
|
||||
let transform = XRRigidTransform::new(global, cast_transform(pose));
|
||||
let pose = reflect_dom_object(Box::new(XRViewerPose::new_inherited(&transform)), global);
|
||||
|
|
|
@ -249,8 +249,11 @@ impl XRWebGLLayerMethods for XRWebGLLayer {
|
|||
Rect::new(origin, self.size().cast())
|
||||
},
|
||||
(XREye::None, Views::Mono(view)) => view.viewport,
|
||||
(XREye::None, Views::StereoCapture(_, _, view)) => view.viewport,
|
||||
(XREye::Left, Views::Stereo(view, _)) => view.viewport,
|
||||
(XREye::Left, Views::StereoCapture(view, _, _)) => view.viewport,
|
||||
(XREye::Right, Views::Stereo(_, view)) => view.viewport,
|
||||
(XREye::Right, Views::StereoCapture(_, view, _)) => view.viewport,
|
||||
_ => return None,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue