#include "imgui_impl_glfw.h" #include "vulkan_helper.h" #include "vulkan/vulkan_core.h" #include #include #include #include std::vector get_glfw_instance_extensions(); namespace iris { struct Swapchain { Device device; VkSurfaceKHR surface = VK_NULL_HANDLE; VkSwapchainKHR swapchain = VK_NULL_HANDLE; VkRenderPass render_pass = VK_NULL_HANDLE; VkDescriptorPool descriptor_pool = VK_NULL_HANDLE; GLFWwindow *window = nullptr; uint32_t width = -1; uint32_t height = -1; bool needs_recreate = false; static constexpr uint32_t SWAPCHAIN_IMAGE_COUNT = 3; VkImage swapchain_images[SWAPCHAIN_IMAGE_COUNT]; VkImageView swapchain_image_views[SWAPCHAIN_IMAGE_COUNT]; VkFramebuffer framebuffers[SWAPCHAIN_IMAGE_COUNT]; Texture2D upload_texture; void resize(uint32_t new_width, uint32_t new_height); Swapchain(GLFWwindow *window, iris::Device device); ~Swapchain(); }; } // namespace iris