Shareable graphics resources#2887
Merged
sankhesh merged 26 commits intoKitware:masterfrom Oct 14, 2023
Merged
Conversation
floryst
reviewed
Aug 8, 2023
Contributor
floryst
left a comment
There was a problem hiding this comment.
Exciting work! We will need to update the types for certain classes (e.g. ImageProperty, VolumeProperty, IStatistics, etc.).
f4686a5 to
2f9100b
Compare
12 tasks
jadh4v
approved these changes
Aug 10, 2023
Collaborator
jadh4v
left a comment
There was a problem hiding this comment.
Some subjective comments, but overall looks good to me. Really cool work!
Contributor
|
Very good work, I hope it will be merged soon! |
0d6e860 to
04147be
Compare
This allows re-using and sharing across viewports/mappers.
… valid data array
Demonstrate sharing of scalar, color and opacity textures. Demonstrate allocated GPU memory counting of textures.
…esources After detaching the program and before setting it to null, the program must be deleted from the context. This change also ensures that the shaders attached to the program are detached and deleted at cleanup time.
This change allows consumer applications to release any graphics memory allocated by vtk-js while keeping the context alive. This is an idempotent invocation that allows existing props/mappers to re-allocate resources in the next render call.
Allow re-allocation when the shaders, textures, etc. are freed at the context level.
706cabe to
f256fb5
Compare
floryst
reviewed
Oct 13, 2023
|
🎉 This PR is included in version 28.13.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Add ability to cache graphics resources at the context level and have mappers re-use them if they are looking at the same data in the same render window.
Results
This ability opens up graphics resource sharing across viewports in applications where the same dataset is being rendered by different mappers. An example of this is provided with a QuadView that has three image reslice views and a volume view, all looking at the same 3D vtkImageData. Without this change, each mapper would be uploading the whole dataset to the GPU.
Changes
PR and Code Checklist
npm run reformatto have correctly formatted codeTesting