Add a pref for webxr glwindow anaglyphic red-cyan stereo

This commit is contained in:
Alan Jeffrey 2020-04-28 18:24:36 -05:00
parent 28d2cbf6bc
commit d4f0dbce25
5 changed files with 19 additions and 6 deletions

View file

@ -54,7 +54,7 @@ impl App {
))
};
let xr_discovery = if pref!(dom.webxr.glwindow) {
let xr_discovery = if pref!(dom.webxr.glwindow.enabled) {
let window = window.clone();
let surfman = window.webrender_surfman();
let events_loop = events_loop.clone();

View file

@ -651,6 +651,14 @@ impl webxr::glwindow::GlWindow for XRWindow {
fn get_translation(&self) -> Vector3D<f32, UnknownUnit> {
self.pose.xr_translation.get().clone()
}
fn get_mode(&self) -> webxr::glwindow::GlWindowMode {
if pref!(dom.webxr.glwindow.red_cyan) {
webxr::glwindow::GlWindowMode::StereoRedCyan
} else {
webxr::glwindow::GlWindowMode::StereoLeftRight
}
}
}
impl XRWindowPose {