Wgpu samples based on Learn OpenGL.
I've tried to follow the order of the original tutorials as best as possible but have added or reorganised samples where I think it makes sense. The following sections serve as a contents page of sorts. To run a specific sample, type:
cargo run --bin SAMPLE_NAME
The SAMPLE_NAME
to run is shown next to the respective sample in the below list.
For example, to run the Hello triangle sample, type:
cargo run --bin hello-triangle
- Hello triangle (
hello-triangle
) - Hello rectangle (
hello-rectangle
) - Shaders (VBO) (
shaders
) - Shaders (UBO) (
shaders-uniform
) - Textures (
textures
) - todo: Mipmaps for textures. Do it here because that's when the original introduces it.
- Textures mixed (
textures-mixed
) - Transformations (
transformations
) - Coordinate systems (
coordinate-systems
) - More cubes (
more-cubes
) - Camera (
camera
)
- Colors (
colors
) - Basic lighting (
basic-lighting
) - Materials (
materials
) - Lighting maps (
lighting-maps
) - Light casters (directional) (
light-casters-directional
) - Light casters (point) (
light-casters-point
) - Light casters (spotlight) (
light-casters-spotlight
) - Multiple lights (
multiple-lights
)
I've combined the Assimp, Mesh and Model sections into one complete sample.
- Model loading (
model-loading
)
It would be rude to not acknowledge, up front, the key resources that I have used to learn WGPU and graphics programming.
- Learn OpenGL. Thank you Joey de Vries for the awesome work you've done explaining GPU graphics programming and the OpenGL API.
- Learn Wgpu. Thank you Benjamin Hansen for the amazing kickstart your knowledge of wgpu has given me.
My code is made available under the terms of the MIT license.
The original Learn OpenGL code is copyright Joey de Vries and made available under the terms of the CC BY-NC 4.0 license (human readable format, full license). Images and other media from the original Learn OpenGL tutorials are made available under the terms of the CC BY 4.0 license (human readable format, full license).