To create a swapchain, we need to acquire a lot of additional information and prepare a considerable number of parameters. To present the order of all the steps required for the preparation phases and how to use the acquired information, we will create a swapchain with arbitrarily chosen parameters. For it, we will set a mailbox presentation mode, the most commonly used R8G8B8A8 color format with unsigned normalized values (similar to OpenGL's RGBA8 format), no transformations, and a standard color attachment image usage.
Creating a swapchain with R8G8B8A8 format and a mailbox present mode
How to do it...
- Prepare a physical device handle. Store it in a variable of type VkPhysicalDevice named physical_device.
- Take the handle of a created presentation surface...