Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We shouldn't default XREyes to left when they're unknown #620

Closed
Manishearth opened this issue Apr 30, 2019 · 4 comments · Fixed by #641
Closed

We shouldn't default XREyes to left when they're unknown #620

Manishearth opened this issue Apr 30, 2019 · 4 comments · Fixed by #641
Labels
help wanted This is a good issue for anyone to pick up and work on filing a PR for. potential breaking change Issues that may affect the core design structure.
Milestone

Comments

@Manishearth
Copy link
Contributor

#614 (comment)

We probably don't want CAVE systems reporting "left" for all n views

Reporting single-screen devices as "left" doesn't make much sense but sort of works. This falls apart more for multi-screen devices (especially where they have more than two screens) where every screen would be reported as "left", which might be misleading.

It's worth adding an Unknown/Other variant, or even making the eye an interface that lets us number them.

@toji
Copy link
Member

toji commented May 1, 2019

We could add a new enum such as "unknown", sure. (OpenXR uses the term "both", which seems reasonable as well.) The thought process behind the current spec text is that the eye visibility should only really matter when displaying pre-rendered stereo content. In that scenario, the content will need to choose either the left or right eye's content to display, which is why it felt appropriate to simply choose one of the eyes to report in cases when neither was applicable.

The primary consequence of adding a third eye state would simply be moving that decision from the API to the developers code, which almost certainly would look like this:

if(eye == 'right') {
  renderRightEyeContent();
} else {
  renderLeftEyeContent();
}

Which, really, is no different than the code in the two-enum case. So I'd mostly be interested in understanding what new uses cases reporting a third value would enable.

@cwilso cwilso added the potential breaking change Issues that may affect the core design structure. label May 6, 2019
@toji toji added this to the May 2019 milestone May 6, 2019
@toji toji added the help wanted This is a good issue for anyone to pick up and work on filing a PR for. label May 6, 2019
@toji
Copy link
Member

toji commented May 6, 2019

Editors talked it over and decided we probably do want to introduce a third enum here. Major deciding factor is that even if we can't identify a specific use case for it now, if we do find one in the future it would be a reasonably significant breaking change to introduce a third state after shipping core.

As far as the verbiage goes, we think it would be best to simply mimic XRHandedness here, making the three enums left, right, and none.

@NellWaliczek
Copy link
Member

@Manishearth Do you want to pick this one up?

@Manishearth
Copy link
Contributor Author

Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted This is a good issue for anyone to pick up and work on filing a PR for. potential breaking change Issues that may affect the core design structure.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants