Guide for using gfx-rs's wgpu library.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Ben Hansen 73aed6c6bd rustfmt 4 years ago
code rustfmt 4 years ago
docs rustfmt 4 years ago
.gitignore finished gif showcase 4 years ago
Cargo.lock rustfmt 4 years ago
Cargo.toml started performance research 4 years ago
FEATURES.md tutorial4-buffer 5 years ago
LICENSE.md license 4 years ago
deploy.sh fixing deploy.sh 4 years ago
package-lock.json Bump http-proxy from 1.18.0 to 1.18.1 4 years ago
package.json finished lighting rewrite 4 years ago
run-all.sh updated winit to 0.20 4 years ago
rustfmt.toml rustfmt 4 years ago

docs/README.md

Introduction

What is wgpu?

Wgpu is a Rust implementation of the WebGPU API spec. WebGPU is a specification published by the GPU for the Web Community Group. It aims to allow web code access to GPU functions in a safe and reliable manner. It does this by mimicking the Vulkan API, and translating that down to whatever API the host hardware is using (ie. DirectX, Metal, Vulkan).

Wgpu is still in development, so some of this doc is subject to change.

Why Rust?

Wgpu actually has C bindings to allow you to write C/C++ code with it, as well as use other languages that interface with C. That being said, wgpu is written in Rust, and it has some convient Rust Bindings that don't have to jump through any hoops. On top of that, I've been enjoying writing in Rust.

You should be fairly familiar with Rust before using this tutorial as I won't go into much detail on Rust syntax. If you're not super comfortable with Rust you can review the Rust tutorial. You should also be familiar about Cargo.

I'm using this project as a way to learn wgpu myself, so I might miss some important details, or explain things wrong. I'm always open to constructive feedback. That being said, let's get started!