// SPDX-FileCopyrightText: 2024 Joshua Goins // SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include #include #include class Device; class SwapChain { public: SwapChain(Device &device, VkSurfaceKHR surface, int width, int height); void resize(VkSurfaceKHR surface, int width, int height); VkSwapchainKHR swapchain = VK_NULL_HANDLE; VkExtent2D extent; std::vector swapchainImages; std::vector swapchainViews; std::array inFlightFences; std::array imageAvailableSemaphores, renderFinishedSemaphores; uint32_t currentFrame = 0; VkFormat surfaceFormat; private: Device &m_device; };