#pragma once #include #include namespace Engine { class LogicalDevice; class SwapChain { friend class LogicalDevice; public: SwapChain(LogicalDevice* logical); SwapChain(LogicalDevice* logical, const VkExtent2D& extent); ~SwapChain(); VkExtent2D getExtent() const; VkFramebuffer getFrameBuffer(uint32_t index); private: void create(); private: LogicalDevice* logical; VkSwapchainKHR vk; std::vector images; VkExtent2D extent; std::vector imageViews; std::vector frameBuffers; }; }