-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
viewport_node example: Remove main world image initialization #19098
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
base: main
Are you sure you want to change the base?
viewport_node example: Remove main world image initialization #19098
Conversation
4ff8b44
to
9dcf881
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.
I didn't test the example admittedly. |
The main world access is used by bevy/crates/bevy_ui/src/widget/viewport.rs Lines 154 to 176 in 4051465
|
Thanks, fixed! <3 Also removed the query for the window size, as the result gets overwritten anyways. |
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.
Objective
The new viewport example allocates a texture in main memory, even though it's only needed on the GPU. Also fix an unnecessary warning when a viewport's texture doesn't exist CPU-side.
Testing
Run the
viewport_node
example.