#pragma once #include #include #include #include // #include #include #include #include namespace lt::renderer::vk { using memory::NullOnMove; class Context { public: Context(const ecs::Entity &surface_entity); [[nodiscard]] auto instance() const -> VkInstance { return Instance::get(); } [[nodiscard]] auto device() const -> const Device & { return m_device; } [[nodiscard]] auto swapchain() const -> const Swapchain & { return m_swapchain; } void recreate_swapchain() { m_swapchain.destroy(); m_swapchain = Swapchain { m_device, m_surface }; } private: Surface m_surface; Device m_device; Swapchain m_swapchain; }; } // namespace lt::renderer::vk