Files
wgpu/examples/capture
2020-05-05 21:55:42 -04:00
..
2020-05-05 21:55:42 -04:00
2020-04-26 18:59:48 -02:30
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