mirror of
https://github.com/servo/servo.git
synced 2025-08-17 03:15:34 +01:00
Add a pref for webxr glwindow anaglyphic red-cyan stereo
This commit is contained in:
parent
28d2cbf6bc
commit
d4f0dbce25
5 changed files with 19 additions and 6 deletions
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue