#pragma once #include "forward.hpp" #include "../../../core/utils/logger.hpp" #include #include struct GLFWwindow; namespace render::vk { struct SwapChainSupportDetails { VkSurfaceCapabilitiesKHR capabilities; std::vector formats; std::vector presentModes; static SwapChainSupportDetails Query(VkPhysicalDevice, VkSurfaceKHR); bool isValid() const { return !formats.empty() && !presentModes.empty(); } }; struct QueueFamilyIndices { std::optional graphicsFamily; std::optional presentFamily; static QueueFamilyIndices Query(VkPhysicalDevice, VkSurfaceKHR); bool isComplete() const { return graphicsFamily.has_value() && presentFamily.has_value(); } }; struct PhysicalDeviceInfo { VkPhysicalDevice device = VK_NULL_HANDLE; GLFWwindow *window; SwapChainSupportDetails swapDetails; QueueFamilyIndices queueIndices; VkSurfaceFormatKHR surfaceFormat; VkSurfaceKHR surface; }; }