Fitting the Vulkan nuts and bolts together
Going from zero to hero in Vulkan is not hard. It takes a couple of hours if you copy and paste the example code from one of the tutorials, and even longer if you type it. Once you understand the roles and dependencies of the objects, your adventure begins.
The example code for the Vulkan renderer can be found in the chapter03
| vulkan_renderer
folder of this book’s GitHub repo.
We start with the basic classes of the Vulkan renderer.
General considerations about classes
Similar to the OpenGL renderer, the creation and management of some Vulkan objects has been moved to separate classes. This helps to avoid creating a so-called “god class,” which is huge and a maintenance nightmare for developers, and it enables us to quickly add more objects of a specific type. In Chapter 4, we will create new shaders and switch between them, and having a separate Pipeline
class to hand makes this possible with a few changes...