Skip to content

Commit

Permalink
Update 2019-03-06-wgpu.md
Browse files Browse the repository at this point in the history
  • Loading branch information
unconed authored and grovesNL committed Mar 7, 2019
1 parent a48b217 commit b90f8fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _posts/2019-03-06-wgpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ With these goals in mind, we'd like to announce our new project: [wgpu-rs](https

wgpu-rs is aiming to be a safe, portable API which reduces the complexity of working with low-level graphics APIs. It has a layered implementation:

- The `wgpu-native` layer which exposes a C API. `wgpu-native` implemented on top of gfx-hal which allows it to work with the same platforms that gfx-hal already supports. The idea is that `wgpu-native` will have a compatible C API with Google's [Dawn](https://dawn.googlesource.com/dawn) implementation so they can be used interchangeably for applications compiled in other languages.
- The `wgpu-rs` layer which is an idiomatic safe Rust API. It uses `wgpu-native` internally when targetting the native targets. It will use Web APIs (from WASM host bindings) directly when targetting the Web in the future.
- The `wgpu-native` layer which exposes a C API. `wgpu-native` is implemented on top of gfx-hal which allows it to work with the same platforms that gfx-hal already supports. The idea is that `wgpu-native` will have a compatible C API with Google's [Dawn](https://dawn.googlesource.com/dawn) implementation so they can be used interchangeably for applications compiled in other languages.
- The `wgpu-rs` layer which is an idiomatic safe Rust API. It uses `wgpu-native` internally on native targets. It will use Web APIs (from WASM host bindings) directly when targeting the Web in the future.

Let's dive into the mentioned qualities of the API:

### Simple

Writing straight Vulkan code for an application can easily challenge users sanity. It's a great API, it's well documented, but still very complex, and it's made with the focus on engines as opposed to direct users. You have to think about the memory allocations, pipeline stages, resource states and lifetimes, all the time. Just rendering a textured rectangle out there without triggering any validation warnings is an achievement.
Writing straight Vulkan code for an application can easily challenge a user's sanity. It's a great API, it's well documented, but still very complex, and it's made with a focus on engines as opposed to direct users. You have to think about the memory allocations, pipeline stages, resource states and lifetimes, all the time. Just rendering a textured rectangle out there without triggering any validation warnings is an achievement.

WebGPU automates some of the aspects of low-level graphics APIs which have high complexity but low return on investment. It still has the core pieces of the next-gen APIs, such as command buffers, render passes, pipeline states and layouts. Because the complexity is reduced, users will be able to direct more focus towards writing efficiently application code.

Expand Down

0 comments on commit b90f8fe

Please sign in to comment.