wgpu 0.13.1

Rusty WebGPU API wrapper
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 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](./screenshot.png)