From 262ac84f2cdfadde1f00ab092362dd4610909e03 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Thu, 18 Jun 2020 12:41:38 -0400 Subject: [PATCH] Example feature matrix --- examples/README.md | 41 ++++++++++++++++++++++++++ examples/{describe => hello}/README.md | 4 +-- examples/{describe => hello}/main.rs | 0 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 examples/README.md rename examples/{describe => hello}/README.md (87%) rename examples/{describe => hello}/main.rs (100%) diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 000000000..69f34ffcc --- /dev/null +++ b/examples/README.md @@ -0,0 +1,41 @@ +## 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 show 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 | :star: | :star: | :star: | :star: | :star: | | :star: | :star: | +| instancing | :star: | | | | | | | | +| lines and points | | | | :star: | | | | | +| sampled color textures | :star: | :star: | :star: | | | :star: | :star: | :star: | +| storage textures | :star: | | | | | | | | +| binding array | | | | | | | :star: | | +| comparison samplers | | | | | :star: | | | | +| subresource views | | | :star: | | :star: | | | | +| cubemaps | | | | | | :star: | | | +| multisampling | | | | :star: | | | | | +| off-screen rendering | | | | | :star: | | | :star: | +| stencil testing | | | | | | | | | +| depth testing | | | | | :star: | | | :star: | +| read-only depth | | | | | | | | :star: | +| blending | | | | | | | | :star: | +| render bundles | | | | :star: | | | | :star: | +| compute passes | :star: | | | | | | | | +| optional extensions | | | | | | | :star: | | +| - binding indexing | | | | | | | :star: | | +| WGSL shaders | | | | | | | | | + +## Hacking + +You can record an API trace any of the framework-based examples by starting them as: +```sh +mkdir -p trace && WGPU_TRACE=trace cargo run --features trace --example +``` diff --git a/examples/describe/README.md b/examples/hello/README.md similarity index 87% rename from examples/describe/README.md rename to examples/hello/README.md index 5a45d7ad6..a24ad33b2 100644 --- a/examples/describe/README.md +++ b/examples/hello/README.md @@ -1,11 +1,11 @@ -# describe +# hello This example prints output describing the adapter in use. ## To Run ``` -cargo run --example describe +cargo run --example hello ``` ## Example output diff --git a/examples/describe/main.rs b/examples/hello/main.rs similarity index 100% rename from examples/describe/main.rs rename to examples/hello/main.rs