Usually, when we create 3D applications that render images, we would like images to be displayed on screen. For this purpose, a swapchain object is created in Vulkan. We know how to acquire images from a swapchain. We have also learned how to present them. Here, we will see how to connect image acquiring and presentation, how to record a command buffer in between, and how we should synchronize all of these operations to render a single frame of animation.
Preparing a single frame of animation
How to do it...
- Take the handle of a logical device and store it in a variable of type VkDevice named logical_device.
- Use a handle of a created swapchain to initialize a variable of type VkSwapchainKHR named swapchain.
- Prepare a semaphore handle in a variable of type VkSemaphore...