bevy/crates/bevy_render/src/texture
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
..
basis.rs Fix beta clippy lints (#7154) 2023-01-11 09:51:22 +00:00
dds.rs Fix beta clippy lints (#7154) 2023-01-11 09:51:22 +00:00
exr_texture_loader.rs Initial tonemapping options (#7594) 2023-02-19 20:38:13 +00:00
fallback_image.rs Fix some typos (#7763) 2023-02-20 22:56:57 +00:00
hdr_texture_loader.rs update image to 0.24 (#4121) 2022-05-28 02:00:55 +00:00
image_texture_conversion.rs Add screenshot api (#7163) 2023-04-19 21:28:42 +00:00
image_texture_loader.rs Added WebP image format support (#8220) 2023-03-28 19:53:55 +00:00
image.rs Use Image::default for 1 pixel white texture directly (#7884) 2023-03-04 12:29:10 +00:00
ktx2.rs Initial tonemapping options (#7594) 2023-02-19 20:38:13 +00:00
mod.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
texture_cache.rs Make Resource trait opt-in, requiring #[derive(Resource)] V2 (#5577) 2022-08-08 21:36:35 +00:00