bevy/crates/bevy_render
Nile 9db70da96f
Add screenshot api (#7163)
Fixes https://github.com/bevyengine/bevy/issues/1207

# Objective

Right now, it's impossible to capture a screenshot of the entire window
without forking bevy. This is because
- The swapchain texture never has the COPY_SRC usage
- It can't be accessed without taking ownership of it
- Taking ownership of it breaks *a lot* of stuff

## Solution

- Introduce a dedicated api for taking a screenshot of a given bevy
window, and guarantee this screenshot will always match up with what
gets put on the screen.

---

## Changelog

- Added the `ScreenshotManager` resource with two functions,
`take_screenshot` and `save_screenshot_to_disk`
2023-04-19 21:28:42 +00:00
..
macros chore: Release (#7920) 2023-03-06 05:13:36 +00:00
src Add screenshot api (#7163) 2023-04-19 21:28:42 +00:00
Cargo.toml Added WebP image format support (#8220) 2023-03-28 19:53:55 +00:00