Implementing an immediate-mode 3D drawing canvas
The Setting up Vulkan debugging capabilities recipe from Chapter 2, only scratched the surface of graphical application debugging. The validation layers provided by the Vulkan API are invaluable but they do not allow you to debug logical and calculation-related errors. To see what is happening in our virtual world, we need to be able to render auxiliary graphical information such as objects’ bounding boxes and plot time-varying charts of different values or plain straight lines. The Vulkan API does not provide any immediate-mode rendering facilities. All it can do is add commands to command buffers scheduled for later submission. To overcome this difficulty and add an immediate-mode rendering canvas to our applications, we have to write some additional code. Let’s learn how to do it in this recipe.
Getting ready
Make sure you are proficient with all the rendering recipes from Chapter 3. Check the shared/LineCanvas...