Shub's logo

Learn to Draw a Cube using gfx-hal

26 Apr, 2020

3 min read

This blog is a Work in Progress. As I complete learning few things one by one, I will update the doc accordingly.

⚠️  For now, read it at your own risk!!!

I have found that learning new things every often, leads to chaos, and people (specifically ME) tend to forget many things they have already learnt before.

These notes will help me to keep reference notes for myself, as well as for anybody who is willing to learn Vulkan API using gfx-hal.

Do note that gfx-hal provides it's own API, which is very similar to Vulkans', but is not purely Vulkan. If you are very much interested in understanding pure Vulkan API using Rust, I would recommend taking a look into:
For MaikKlein/ash  though, you can find a very good tutorial here.

I still prefer gfx-rs (I call it gfx-hal just to ensure that it's a very low level API, providing us just Hardware Abstraction Layer), becausegfx-hal is cross-platform and have the best in class support for DX-12,Vulkan and Metal.

Learning rust language and vulkan APIs, both are very difficult for starters. I am still struggling to understand the basics, let aside writing proper Memory Management and Performance optimized Rust Code. Reading these notes requires prior knowledge of at-least one statically typed language (like java, C etc.), and some understanding of graphics, though even I am very new to Graphics Programming, so even for me many concepts are very new, and I will try to either explain them as much as I could, or better point you to some reference to take a look into and understand it better.

Special Thanks to:

Before moving forward, I would like to clear some basics on Rust and Cargo. Follow this guide, if you want to clear some basics on the same.

Table of Contents

Draw a Cube

© Copyright 2020 Subroto Biswas