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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.