Skip to content

jo12bar/vulkan-tutorial-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vulkan-tutorial-rs

This is my implementation of the basic renderer described in Alexander Overvoorde's vulkan-tutorial book, in Rust. I'm primarily following Kyle Mayes' Rust translation of the tutorial, which adds some additional "experimental" chapters about techniques for working with dynamic scenes. However, there are some large differences between Kyle's book's code and my code:

  1. Instead of using Kyle Mayes' vulkanalia crate for my Vulkan bindings, I'm using the ash crate, purely because most higher-level Rust graphics libraries are also using ash. vulkanalia and ash have very similar APIs, as they are both primarily generated from the Vulkan API spec, but there are some differences in the helper functions implemented in each library.
  2. I'm using the tracing suite instead of the log suite for logging. This gives me span tracking, which I use in many of the setup functions via the #[tracing::instrument] attribute. [tracing] actually properly categorizes messages from Vulkan's validation layer into the spans, so long as multithreaded processing isn't being used (which my code mostly avoids).
  3. I'm using color-eyre instead of anyhow because pretty colours sooth my soul when my app crashes (and because there's some integration with tracing's spans).
  4. To ease the pain on my poor VSCode install (and my poorly-cooled laptop), I've split the book's single massive Rust source file into many smaller files. This makes rust-analyzer happy.

All commits that follow chapters in Kyle's book are named according to the chapter title, with one commit per chapter. There are some other commits here and there for maintenance, refactoring, or bug-fixing.

Once I finish the book, I may begin experimenting with loading GLTF models and implementing physically-based rendering. Maybe I'll even figure out how skeletal animation works. Aaaannnd I should probably create proper RAII wrappers for all the Vulkan objects I use. We'll see :)

License

See LICENSE.txt.

The original book's text was licensed under the CC BY-SA 4.0 license, while its code listings were licensed under the CC0 1.0 Universal license. Meanwhile, the entirety of Kyle Mayes' adaptation is licensed under the [Apache 2.0][vulkanalia-license] license. Therefore, as I am not re-publishing the original book, and using code samples primarily from Kyle Mayes' adaptation (with reference to the originals), my code is also licensed under the Apache 2.0 license.