-
-
Notifications
You must be signed in to change notification settings - Fork 382
feat(XR): Update to WebXR functionality in OpenGL RenderWindow #2171
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Current changes allow scene to be appropriately rendered onscreen before sending to XR and then in a headset once the button is pressed. However,
It seems that the XR animation frame is cancelled as expected, so the question is why the XRWebGLLayer is still used outside of expected XR methods. This error is not observed with an XR emulator or when the page is rendered natively on a mobile headset (tested on Quest), in which cases the user can interact with the scene as expected after returning from VR. This seems to be an issue with trying to select which display to render to, perhaps as a result of making an existing GL layer XR compatible. @floryst @martinken Any thoughts or suggestions here? I do not see this issue when running the WebXR VR sample, but that example also never tries to render to the main canvas in the browser. EDIT: Resolved below. |
Also pinging @jadh4v as an intro to WebXR investigation |
Above issue is resolved, I was not unbinding the XR context framebuffer in Some remaining issues to note:
EDIT: Pinging @martinken and @floryst for discussion of lingering issues, particularly the framebuffer error. EDIT2: Framebuffer issue resolved in second fixup commit below. |
7e6f30f
to
81f278b
Compare
Second fixup commit contains minor bug fixes and cleanups:
Will plan to squash fixup commits before merge. |
@floryst @martinken this is ready for re-review when you have time |
+1 |
Squashed fixup commits. |
LGTM. Thanks! |
🎉 This PR is included in version 21.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
PR and Code Checklist
npm run reformat
to have correctly formatted codeContext
Replaces WebVR with WebXR methods for running an immersive VR session from an OpenGL RenderWindow.
WebXR exposes methods for both VR and AR sessions across a diverse set of platforms, including standalone headsets, fixed displays, and mobile devices. These changes use WebXR to run a VR session in a dedicated headset or mobile viewer.
Applications/SkyboxViewer
andGeometry/VR
examples are updated for API changes.Planned future additions (outside the scope of this PR):
Changes
RenderWindow
now manages VR sessions withstartXR
,enterXR
,stopXR
, andxrRender
Applications/SkyboxViewer
andGeometry/VR
examples are updated to query availability/launch immersive sessions with VRResults
Applications/SkyboxViewer
andGeometry/VR
examples query VR availability and launch/halt VR sessions correctly in WebXR-compatible browsersTesting