Files
wgpu/examples/capture
bors[bot]andAron Granberg 5c249c4375 Merge #798
798: Fix all the clippy lints r=kvark a=HalfVoxel

Clippy is now happy

Co-authored-by: Aron Granberg <aron.granberg@gmail.com>
2021-03-17 14:02:03 +00:00
..
2021-03-17 14:02:03 +00:00
2020-04-26 18:59:48 -02:30

capture

This example shows how to capture an image by rendering it to a texture, copying the texture to a buffer, and retrieving it from the buffer.

This could be used for "taking a screenshot," with the added benefit that this method doesn't require a window to be created.

To Run

cargo run --example capture
open examples/capture/red.png

Screenshots

Capture example