Commit Graph
66 Commits
Author SHA1 Message Date
Joshua Groves 4fafceb30a Fix typo 2020-11-21 00:07:57 -03:30
Joshua Groves 8d5ef65dcb Temporarily use BackendBit::PRIMARY in examples
`BackendBit::all()` allows GL/surfman to be used on macOS which appears
to prevent rendering with Metal (e.g. hello-triangle displays an empty
window).

surfman will be removed in later versions of gfx, which will allow us
to switch back to `BackendBit::all()` in the examples.
2020-11-20 23:33:10 -03:30
Timo de Kort ee220edce0 Remove implicit conversion hello-triangle shader.vert 2020-11-15 23:13:53 +01:00
Zsolt Bölöny 16427aed19 Rename TextureUsage::OUTPUT_ATTACHMENT to RENDER_ATTACHMENT 2020-11-09 10:35:55 +01:00
Dzmitry Malyshau b6cabe16a2 Enable GL backend 2020-11-04 23:02:01 -05:00
Dzmitry Malyshau 503b61dc6c Update wgpu with another bind group fix, updated power preference 2020-10-13 16:57:52 -04:00
Dzmitry Malyshau 1e695f2803 Update wgpu with pipeline labels 2020-08-13 13:04:23 -04:00
Dzmitry Malyshau ed9a2ca6df Update for the wgpu grand refactor 2020-08-13 00:26:40 -04:00
Marvin Löbel e9cf243663 Udderly remove cows from the following APIs:
- BufferDescriptor
- CommandEncoderDescriptor
- RenderBundleDescriptor
- TextureDescriptor
- TextureViewDescriptor
- PipelineLayoutDescriptor
- SamplerDescriptor
- BindGroupDescriptor
- ProgrammableStageDescriptor
- RenderPassDescriptor
- RenderPipelineDescriptor
- BindGroupLayoutDescriptor
- VertexStateDescriptor
- VertexBufferDescriptor
- RenderBundleEncoderDescriptor
- ComputePipelineDescriptor

Also change anisotropy_clamp to use NonZeroU8
2020-08-12 10:21:38 +02:00
Dzmitry Malyshau 924e4b38e4 Update wgpu for optional layouts 2020-08-10 16:42:52 -04:00
Connor Fitzgerald 7871d100c8 Convert to tracing for logging and add fmt logger 2020-07-26 00:44:39 -04:00
Marvin Löbel eb9299d247 Update wgpu-rs for the Cow changes in wgpu 2020-07-23 00:48:13 +02:00
Rukai be388200dc Update to latest wgpu 2020-07-21 01:51:55 +10:00
Connor Fitzgerald a67047297c Implement PUSH_CONSTANTS feature 2020-07-13 15:43:46 -04:00
Gabriel Majeri eb91482d0b Update to new wgpu-core render pipeline API 2020-07-07 21:02:11 +03:00
Gabriel Majeri a801f64789 Improve hello-triangle docs 2020-06-27 21:25:22 +03:00
Connor Fitzgerald 5529b60da4 Convert Extensions + Capabilities into Features 2020-06-26 01:27:57 -04:00
Connor Fitzgerald 741644d252 Add Tracing 2020-06-22 23:14:29 -04:00
Dzmitry Malyshau 3f57811e7a Another refactor of RenderPassDescriptor API 2020-06-20 19:07:06 -04:00
Dzmitry Malyshau 330986bc66 Update wgpu without peek-poke 2020-06-20 17:20:20 -04:00
Marvin Löbel 693abce446 Move backends: BackendBit paramter to Instance::new() 2020-06-19 01:25:38 +02:00
Dzmitry Malyshau 65718c1e25 Add include_spirv macro 2020-06-18 01:04:42 -04:00
Dzmitry Malyshau 9259d2e51d Update to wgpu with shader validation 2020-06-08 20:54:39 -04:00
Connor Fitzgerald b71c420f7a Implement extensions interface as described in wgpu#691 2020-06-08 01:20:00 -04:00
Connor Fitzgerald cf9d9d6656 Rustify the example's use of Extensions and SamplerDescriptor 2020-06-02 21:44:07 -04:00
AlphaModder 91d46ecc2b Rename SwapChain::get_next_texture to SwapChain::get_next_frame, and have it return errors to the user. 2020-05-30 18:41:31 -07:00
Keeley Hoek ab2f1c7d03 Don't busy-redraw in examples 2020-05-12 03:20:19 +10:00
Dzmitry Malyshau 17b46687ce Rustfmt pass on examples 2020-05-05 21:55:42 -04:00
Dzmitry Malyshau 4413c4648d Update for wgpu-core 2020-04-30 15:52:16 -04:00
Dzmitry Malyshau e30a428190 Port the Web backend to the Context trait 2020-04-26 19:18:24 -04:00
Dzmitry Malyshau ba95354734 Rewire the backend system to remove wgpu-native step
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
2020-04-26 19:18:24 -04:00
Chinedu Francis Nwafili 309cc1cedd Add screenshots of examples
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.
2020-04-26 18:59:48 -02:30
Dzmitry Malyshau b612d9c8ef Fix hello-triangle example format and bind group 2020-04-21 19:08:42 -04:00
Joshua Groves a75100209e Reverse srgb support in hello-triangle 2020-04-19 16:32:50 -02:30
Joshua Groves 423f576d8e Use srgb for swapchain when possible 2020-04-18 01:04:28 -02:30
Joshua Groves f0ab842d6e Combine wasm_main/main and add console_log 2020-04-18 01:04:28 -02:30
Joshua Groves 349f992a7a Switch event loop back to ControlFlow::Poll 2020-04-18 01:04:28 -02:30
Joshua Groves e1eaa6ca26 Add web backend 2020-04-18 01:04:28 -02:30
Hackpoetic a6e81dc703 cargo fmt the code and tweak format rules 2020-04-10 22:56:24 -04:00
Dzmitry Malyshau b93e942b58 Update to latest wgpu, duplicate RequestAdapterOptions 2020-04-02 00:29:24 -04:00
Joshua Groves 31e80d99b3 Update to latest wgpu 2020-03-30 07:58:06 -04:00
Joshua Groves b917a60abd Avoid array indexing in hello-triangle 2020-03-30 07:58:06 -04:00
aloucks d91b78bdfb Add VertexStateDescriptor (#221)
The vertex state properties are now bundled in the VertexStateDescriptor
which matches the spec.

Fixes #220
2020-03-28 10:45:18 -04:00
Joshua Groves b3e4253df1 Return futures from request adapter/request device 2020-03-16 16:35:51 -02:30
Dzmitry Malyshau d842432d17 Update for the latest spec changes 2020-03-15 11:25:06 -04:00
Dzmitry Malyshau 37094051b5 Update wgpu and winit 2020-01-13 13:20:13 -05:00
Ram Kaniyur 68b94ab3a3 Handle resizing in hello-triangle 2020-01-11 11:53:31 +11:00
Joshua Groves a216c2bfca Update to latest winit (0.20.0-alpha6)
- `RedrawRequested` is now used for rendering
- `EventsCleared` replaced by `MainEventsCleared` which requests redraw
- Removed capture from hello-triangle to simplify it slightly
2020-01-04 18:33:33 -03:30
Layl 45426eef9c Change Queue::submit to take &self 2019-12-31 16:24:49 +01:00
Jacob Greenfield 88e8269182 cargo fmt 2019-11-21 00:20:28 -05:00