Files
wgpu/examples
bors[bot]andConnor Fitzgerald 1fb9344bf1 Merge #484
484: Enable features in CI to prevent compiler errors r=kvark a=cwfitzgerald

Simple change, this also builds features in CI.

I added trace and replay features to wasm, even though wasm doesn't support tracing as is, because people may enable them to get serde support for wgpu-types stuff.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-07-29 16:59:20 +00:00
..
2020-07-24 17:24:30 +02:00
2020-07-24 21:39:46 +00:00
2020-07-24 17:24:30 +02:00
2020-07-24 23:37:10 -04:00

Structure

For the simplest examples without using any helping code (see framework.rs here), check out:

  • hello for printing adapter information
  • hello-triangle for graphics and presentation
  • hello-compute for pure computing

Notably, capture example shows rendering without a surface/window. It reads back the contents and saves them to a file.

All framework-based examples render to the window.

Feature matrix

Feature boids cube mipmap msaa-line shadow skybox texture-arrays water
vertex attributes ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐
instancing ⭐
lines and points ⭐
sampled color textures ⭐ ⭐ ⭐ ⭐ ⭐ ⭐
storage textures ⭐
binding array ⭐
comparison samplers ⭐
subresource views ⭐ ⭐
cubemaps ⭐
multisampling ⭐
off-screen rendering ⭐ ⭐
stencil testing
depth testing ⭐ ⭐
depth biasing ⭐
read-only depth ⭐
blending ⭐
render bundles ⭐ ⭐
compute passes ⭐
optional extensions ⭐
- binding indexing ⭐
- push constants ⭐
- depth clamping ⭐
WGSL shaders

Hacking

You can record an API trace any of the framework-based examples by starting them as:

mkdir -p trace && WGPU_TRACE=trace cargo run --features trace --example <example-name>