How to do it...

  1. Take the handle of a primary command buffer and store it in a variable of type VkCommandBuffer named command_buffer.
  2. Start recording the command_buffer (refer to the Beginning a command buffer recording operation recipe from Chapter 3, Command Buffers and Synchronization).
  3. Take the handle of an acquired swapchain image and use it to initialize a variable of type VkImage named swapchain_image (refer to the Getting handles of swapchain images and Acquiring a swapchain image recipes from Chapter 2, Image Presentation).
  4. Store the index of a queue family that is used for swapchain image presentation in a variable of type uint32_t named present_queue_family_index.
  5. Store the index of a queue family used for performing graphics operations ...

Get Vulkan Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.