Putting it all together into a Vulkan application
In this recipe, we use all the material from previous recipes of this chapter to build a Vulkan demo application.
Getting ready
It might be useful to revisit the first recipe, Organizing Vulkan frame rendering code, to get to grips with the frame composition approach we use in our applications.
The full source code for this recipe can be found in Chapter4/VK01_DemoApp
.
How to do it...
Let's skim through the source code to see how we can integrate the functionality from all the recipes together into a single application:
- Just like in the previous demo, we declare a Vulkan instance and render device objects:
VulkanInstance vk; VulkanRenderDevice vkDev;
- We should declare all our "layer" renderers:
std::unique_ptr<ImGuiRenderer> imgui; std::unique_ptr<ModelRenderer> modelRenderer; std::unique_ptr<CubeRenderer> cubeRenderer; std::unique_ptr<VulkanCanvas> canvas; std::unique_ptr...