-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Refactor WebXR Rendering to vtkWebXRRenderWindowHelper
#2924
Conversation
a9ad12a
to
9f8fd5c
Compare
6d2999e
to
d360f3f
Compare
@floryst ping for review EDIT: Also rebased on |
Refactors WebXR rendering support. Under previous behavior WebXR rendering was embedded in vtkOpenGLRenderWindow. This change removes the dependency of vtkOpenGLRenderWindow on WebXR and moves XR components into vtkWebXRRenderWindowHelper. The helper class holds a reference to an underlying render window and is responsible to start/run/stop XR rendering. BREAKING CHANGE: Removes WebXR API from `vtkOpenGLRenderWindow`. Applications requiring XR support must instantiate `vtkWebXRRenderWindowHelper` instead.
Updates WebXR examples for refactoring to `vtkWebXRRenderWindowHelper`.
Replaces `global` definition of XRGLLayer with imported definition from `window`. Addresses observed issue in VolView development where the `global` definition is not yet available at call time.
…pplication logic Updates `vtkWebXRRenderWindowHelper` interface to expose the underlying XR session and to emit the VTK "modified" event when state changes. Motivated by subsequent VolView application development.
…nd public interface Improves TypeScript definitions and removes previous publicAPI methods for setting the XR session and rendering an XR frame. Motivated by subsequent application development in VolView.
Add WebXR TypeScript definitions to vtkWebXRRenderWindowHelper to resolve CI failures.
d360f3f
to
f400bf9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Since this is a breaking change, we will merge it along with the rest of v29 PRs. |
@floryst There is interest in making this available in a VTK.js release sooner rather than later. @aylward made the point this morning that breaking changes are limited to XR users, anyone who was previously using Would you be open to merging this today? Or, when do you expect v29 to release? |
I'll start work to cut a v29 release today. |
Context
Under previous experimentation WebXR rendering support was fully contained within the
vtkOpenGLRenderWindow
. This refactoring encapsulates that support in the new classvtkWebXRRenderWindowHelper
. That class accepts a reference to an underlying render window and is responsible for driving XR operations.Refactoring allows for better separation of concepts and could enable XR rendering with alternate rendering backends other than
vtkOpenGLRenderWindow
in the future.Results
No feature changes. XR methods are removed from the
vtkOpenGLRenderWindow
interface. An application aiming to use WebXR with vtk.js must now instantiate avtkWebXRRenderWindowHelper
to drive XR behavior.Changes
vtkWebXRRenderWindowHelper
vtkOpenGLRenderWindow
PR and Code Checklist
npm run reformat
to have correctly formatted codeTesting
master
Additional Notes
Additional effort may be required for refactoring WebXR interaction handling.