Implementing an immediate mode drawing canvas
Chapter 3, Getting Started with OpenGL and Vulkan, only scratched the surface of the topic 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 object bounding boxes, plot time-varying charts of different values, or just plain straight lines. The Vulkan API and modern OpenGL do not provide or, rather, explicitly prohibit any immediate mode rendering facilities. To overcome this difficulty and add an immediate mode rendering canvas to our frame composition mechanism, we have to write some additional code. Let's learn how to do that in this recipe.
Getting ready
We will need to revisit the RendererBase
and ModelRenderer
classes discussed in the two previous recipes. Check the shared/UtilsVulkanCanvas...