bevy/examples/window
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
..
clear_color.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
low_power.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
multiple_windows.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
scale_factor_override.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
screenshot.rs Add screenshot api (#7163) 2023-04-19 21:28:42 +00:00
transparent_window.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
window_resizing.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
window_settings.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00