mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 07:21:04 +01:00
19 lines
407 B
Markdown
19 lines
407 B
Markdown
# 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
|
|
|
|

|