-
Notifications
You must be signed in to change notification settings - Fork 376
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
Is XRDevice still necessary? #385
Comments
Assorted thoughts on this topic:
One possible solution might be to really differentiate inline and immersive, possibly using different methods, possibly on different objects. It might make sense to tie the immersive session creation to the inline session to allow optimization, such as reusing the session in-headset and trying to use the same graphics adapter. For example, something like this simplified pseudocode:
We could replace the last call with One thing that is not clear in this scenario is how we’d ask about session support for immersive sessions. Is it possible that immersive sessions are supported or support things that inline sessions do not? Maybe this is addressed by allowing applications to query different combinations via the session creation and configuration mechanisms (#376). |
The observations in the second bulleted list in #367 (comment) identify some other interesting issues related to
|
I'm curious what people's thoughts are on this now. My biggest concern is how we deal with multiple devices / modes, especially where they might overlap in functionality, without some notion of device. |
I've posted a pull request for this issue: #405 |
The answer is now definitively "No". Closing. ;) |
It was suggested at the Seattle F2F that
XRDevice
is possibly not a useful interface any longer, and we should evaluate whether or not it should stay in the spec. (Thanks, Nell. 😉) It's a valid question, albeit one that I'm somewhat opinionated about, so I'm opening this issue to lake a look at the reasons why or why not we may want to keep the interface. Whatever we decide, we should strive to resolve this quickly as changes to the fundamental API structure like this really ought to be drawing to a close if we intend to wrap up the core API any time soon.To recap the argument for dropping the interface: We previously made the decision to only return a single
XRDevice
even when multiple physical devices may be connected to the system. This means that we could probably make the device implicit and still achieve the same thing with less API surface in some cases. Less API surface being a generally accepted Good Thing:tm: it's easy to see why the idea is attractive.Presumably if we dropped the
XRDevice
interface, the WebXR initialization code path would look something like:It's my opinion, though, that the
XRDevice
interface still has value largely because of WebGL context compatibility:Furthermore, if we ever DO want to extend the API to allow for more nuance in how physical devices are enumerated we'll want a
XRDevice
-like concept regardless.That's the state of things as I see it currently, would love to hear reasons from other contributors for or against keeping this particular level of abstraction.
The text was updated successfully, but these errors were encountered: