It’s been years since I worked on anything GPU related, but I got a little inspiration at GDC and decided to get up to speed with the Vulkan API.
I’ve been using these tutorials as reference:
When I’m learning a new API or a new technology, I like to apply what I’m learning in the context of past experiences. A lot of API tutorials sort of throw topic after topic at you with code snippets, and if you’re following along and adding code as you go along you’ll find yourself in a sudden mess of multi-thousand line source files. This is especially true with the Vulkan API.
Vulkan requires a fair amount of code for setup. There are device queries to be made, capabilities to be looked at, physical devices, logical devices, layers, extensions, queues, surfaces, windows, and so on.
Anyway, I decided to learn with Vulkan by creating a reusable library I could use with small projects in the future. The end goal is to learn. Creating the library is how I’m going to learn. I’ll be making on-the-fly design decisions for the library as I proceed through each step of Vulkan, which in itself is a learning experience. In the end, the library could potentially turn out terrible, or it could turn out great - either way it doesn’t matter. The goal here is to learn.
Vulkan is cross-platform, but I’m making this project on Windows and with Visual Studio. Even so, for an additional challenge I’ll be keeping in mind platform layers and such that would be needed to keep the project cross-platform. I expect this will mainly affect the window/surface part of the code, but we’ll see.
I’ve already started the project, but I’m sort of stopping for a moment so I can come back and write about each phase of the learning/design process. The on-the-fly design approach makes documenting a little more difficult unless I just stop and force it.
I’ll get a part 2 up soon.