bevy/crates/bevy_render/src
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
..
camera Add screenshot api (#7163) 2023-04-19 21:28:42 +00:00
color Color::Lcha constructors (#8041) 2023-03-11 18:50:16 +00:00
mesh Fix get_vertex_buffer_data doc (#8400) 2023-04-17 16:12:12 +00:00
primitives Minor mistake in Frustum::intersects_obb (#8305) 2023-04-05 19:37:59 +00:00
render_graph Use RenderGraphApp in more places (#8298) 2023-04-05 20:57:56 +00:00
render_phase Non-breaking change* from UK spellings to US (#8291) 2023-04-08 16:22:46 +00:00
render_resource Add screenshot api (#7163) 2023-04-19 21:28:42 +00:00
renderer Add screenshot api (#7163) 2023-04-19 21:28:42 +00:00
texture Add screenshot api (#7163) 2023-04-19 21:28:42 +00:00
view Add screenshot api (#7163) 2023-04-19 21:28:42 +00:00
extract_component.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
extract_param.rs Use UnsafeWorldCell to increase code quality for SystemParam (#8174) 2023-04-01 15:45:07 +00:00
extract_resource.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
globals.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
globals.wgsl Refactor Globals and View structs into separate shaders (#7512) 2023-02-11 17:55:18 +00:00
lib.rs Suppress the clippy::type_complexity lint (#8313) 2023-04-06 21:27:36 +00:00
pipelined_rendering.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
render_asset.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
settings.rs add OpenGL and DX11 backends (#7481) 2023-02-04 23:20:20 +00:00
spatial_bundle.rs enum Visibility component (#6320) 2022-12-25 00:39:29 +00:00