Skip to content

Commit

Permalink
Workarounds for webxr glwindow on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Jeffrey committed May 5, 2020
1 parent 2b20f04 commit 5c3f1c9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Expand Up @@ -33,4 +33,3 @@ winapi = { git = "https://github.com/servo/winapi-rs", branch = "patch-1" }
spirv_cross = { git = "https://github.com/servo/spirv_cross", branch = "wgpu-servo" }
surfman-chains = { git = "https://github.com/asajeffrey/surfman-chains" }
surfman = { git = "https://github.com/servo/surfman" }

2 changes: 2 additions & 0 deletions components/config/prefs.rs
Expand Up @@ -300,6 +300,8 @@ mod gen {
glwindow: {
#[serde(default)]
enabled: bool,
#[serde(rename = "dom.webxr.glwindow.left-right")]
left_right: bool,
#[serde(rename = "dom.webxr.glwindow.red-cyan")]
red_cyan: bool,
},
Expand Down
4 changes: 3 additions & 1 deletion ports/glutin/headed_window.rs
Expand Up @@ -655,8 +655,10 @@ impl webxr::glwindow::GlWindow for XRWindow {
fn get_mode(&self) -> webxr::glwindow::GlWindowMode {
if pref!(dom.webxr.glwindow.red_cyan) {
webxr::glwindow::GlWindowMode::StereoRedCyan
} else {
} else if pref!(dom.webxr.glwindow.left_right) {
webxr::glwindow::GlWindowMode::StereoLeftRight
} else {
webxr::glwindow::GlWindowMode::Blit
}
}
}
Expand Down
1 change: 1 addition & 0 deletions resources/prefs.json
Expand Up @@ -34,6 +34,7 @@
"dom.webvtt.enabled": false,
"dom.webxr.enabled": true,
"dom.webxr.glwindow.enabled": true,
"dom.webxr.glwindow.left-right": false,
"dom.webxr.glwindow.red-cyan": false,
"dom.webxr.hands.enabled": false,
"dom.webxr.layers.enabled": false,
Expand Down

0 comments on commit 5c3f1c9

Please sign in to comment.