Main change here is the introduction of the Context trait.
The "direct" implementation of it goes straight to wgpu-core.
This commit also has small improvements:
- consuming command buffers on submit
- Instance type
- proper call to destructors
When looking into wgpu-rs as a replacement for WebGL I went to the
examples directory on GitHub to browse for a bit.
I wanted to see some of the examples at a glance without needing to
clone the repository.
This commit enables that by adding a README to each example with a
description of the example and screenshots / example output.
In a few cases the description is a bit redundant - but my hope is that
in the future we can improve all the READMEs.
Being a web API and thus very accessible, WebGPU could end up being many
people's first introduction to graphics programming so the lower we make
the barrier the better.
262: Reverse srgb in hello-triangle r=kvark a=grovesNL
Reverse srgb support in hello-triangle (these were backwards by mistake)
Co-authored-by: Joshua Groves <josh@joshgroves.com>
`File::create` isn't available on wasm, so we can't actually write the
output image anywhere unless we target something else as the file
system (e.g. local storage)
Remove odd patching matching
Replace std::sync::Mutex with spin::Mutex in GpuFuture
Reduce GpuFuture usage to one explicit allocation instead of two
Fix examples to poll the device in the background when using map_read or map_write
Remove device.poll from GpuFuture::poll and document future invariants
Massively simplify examples
Use Arc::clone(...) instead of arc.clone()
Switch println to log::info
210: Update WGPU deps to rev 08e8d406c1 r=kvark a=aloucks
I also moved the `path` chunks in `Cargo.toml` to a single `[patch]` section so that it's one block to commment/uncomment for local development.
Co-authored-by: Aaron Loucks <aloucks@cofront.net>