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

the API in Devices sometimes passes sessionId, sometimes does not #129

Open
blairmacintyre opened this issue Dec 20, 2019 · 3 comments
Open

Comments

@blairmacintyre
Copy link
Contributor

By not passing sessionID to all methods in the XRDevice class, it is impossible to support different capabilities and values on different sessions.

For example, if there is an inline session and an immersive session active, they share values of the various spaces.

Methods include: getProjectionMatrix, getBasePoseMatrix, getBaseViewMatrix, getInputSources, getInputPose, requestFrameOfReferenceTransform, requestStageBounds

@blairmacintyre
Copy link
Contributor Author

To expand on this: if a polyfill device wants to support both immersive sessions and inline sessions, it needs to know what kind of session is calling the device methods. Since, for example, the inline session may want / need to return different values from the immersive sessions. Some of the above only seem to be called during a rAF callback, so a device can save the current session of the frame in onFrameStart. But others (e.g., getInputSources) can be called anywhere.

@blairmacintyre
Copy link
Contributor Author

The right solution would be to have the session methods pass the session ID down to all device methods. Does anyone not agree with this?

@jsantell
Copy link
Contributor

jsantell commented Jan 2, 2020

IIRC this was necessary for previous AR prototypes; (all of?) the methods should be changed to receive session ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants