-
VkFramebuffer+VkRenderPassdefines the render target. -
Render pass defines which attachment will be written with colors.
-
VkFramebufferdefines whichVkImageViewis to be which attachment. -
VkImageViewdefines which part ofVkImageto use. -
VkImagedefines whichVkDeviceMemoryis used and a format of the texel.
Or maybe in opposite sequence:
-
VkDeviceMemoryis just a sequence of N bytes in memory. -
VkImageobject adds to it e.g. information about the format (so you can address by texels, not bytes). -
VkImageViewobject helps select only part (array or mip) of theVkImage(like stringView, arrayView or whathaveyou does). Also can help to match to some incompatible interface (by type casting format). -
VkFramebufferbinds aVkImageViewwith an attachment. -
VkRenderpassdefines which attachment will be drawn into
So it’s not like you do not use an image. You do, through the Vulkan Framebuffer.
Swapchain image is no different from any other image. Except that the driver is the owner of the image. You can’t destroy it directly or allocate it yourself. You just borrow it from the driver for the duration between acquire and present operation.
There’s (usually) more of the swapchain images for the purposes of buffering and advance rendering. AFAIK you would need a separate VkFramebuffer for each image (which is annoying, but more in tune with what actually happens underneath).
