mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 16:24:24 +00:00
507101987b
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md | ||
screenshot.png |
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 --bin capture
open examples/capture/red.png