-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Usability methods for RenderTargets and image handles #10736
Usability methods for RenderTargets and image handles #10736
Conversation
Signed-off-by: Torstein Grindvik <torstein.grindvik@muybridge.com>
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.
Not totally sold on having an infallible version here, but that's fine.
I was on the fence myself but included it due to Bevy having several APIs which panic if user assumptions fail: But it's not that important to have so let me know if you'd rather have me remove it. |
Yeah let's remove it. We tend to include them only in cases where it's a) very hard to accidentally panic b) the API is very high-traffic. |
Signed-off-by: Torstein Grindvik <torstein.grindvik@muybridge.com>
Signed-off-by: Torstein Grindvik <torstein.grindvik@muybridge.com>
That makes sense to me. |
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.
Looks good to me.
Objective
In my code I use a lot of images as render targets.
I'd like some convenience methods for working with this type.
Solution
.into()
to construct aRenderTarget
.as_image()
Changelog
Added
RenderTarget
can be constructed via.into()
on aHandle<Image>
RenderTarget
new method:as_image