#ifndef VULKAN_UTILS_HPP #define VULKAN_UTILS_HPP #include // I don't know if we should directly include vulkan or not #define GLFW_INCLUDE_VULKAN #include namespace engine::myvk { struct api { uint32_t raw; }; constexpr std::ostream& operator<<(std::ostream& os, const api& api) { // this code is unreadable but it amuses me return (VK_API_VERSION_VARIANT(api.raw) == 0 ? os : os << "(variant " << VK_API_VERSION_VARIANT(api.raw) << ") ") << VK_API_VERSION_MAJOR (api.raw) << "." << VK_API_VERSION_MINOR (api.raw) << "." << VK_API_VERSION_PATCH (api.raw); } } #endif // VULKAN_UTILS_HPP