Files
wgpu/examples/capture
Christopher Fleetwood 3305e88d63 feature: Timestamp queries (#3636)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Connor Fitzgerald <connor@modyfi.io>
2023-08-02 18:04:24 -04:00
..
2023-08-02 18:04:24 -04:00

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

Screenshots

Capture example