Once the Render Pass is created, it is used to create the framebuffer. Ideally, for each swapchain color image, we need a framebuffer associated with it. For example, if we have a double buffer swapchain image, then we need two framebuffers: one for the front buffer and another for the back buffer image.
The framebuffer in Vulkan is created using the
vkCreateFrameBuffer() API. Like with other Vulkan APIs, this also has a create info control structure called
VkFrameBufferCreateInfo. Refer to the following for more information on its syntax and usage:
VkResult vkCreateFrameBuffer( VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFrameBuffer); ...