To use a picture, we have to create an ImageView. The picture doesn't have any information, such as mipmap levels, and you can't access a portion of the picture. However, by now using picture views, we specify the type of the texture and whether it has mipmaps. In addition, in renderpass, we specified the attachments per frame buffer. We will create framebuffers here and pass in the picture views as attachments.
Create a new class called RenderTexture. In the RenderTexture.h file, add the following headers and then create the class itself:
#include <vulkan/vulkan.h> #include<array> class RenderTexture { public: RenderTexture(); ~RenderTexture(); std::vector<VkImage> _swapChainImages; VkExtent2D _swapChainImageExtent; std::vector<VkImageView> swapChainImageViews; std::vector...