| 67 | }; |
| 68 | |
| 69 | static const char *GetVulkanLibrary() { |
| 70 | static const char *TABLE[] = { |
| 71 | "vulkan-1.dll", // PLATFORM_WINDOWS_X86 |
| 72 | "vulkan-1.dll", // PLATFORM_WINDOWS_ARM |
| 73 | "libvulkan", // PLATFORM_LINUX |
| 74 | "/usr/local/lib/libvulkan", // PLATFORM_MACOS |
| 75 | "N/A", // PLATFORM_ANDROID |
| 76 | "N/A", // PLATFORM_IOS |
| 77 | }; |
| 78 | static_assert(std::size(TABLE) == PLATFORM_COUNT, "The tranlation table size doesn't match the enum number of elements"); |
| 79 | |
| 80 | return TABLE[VKC_PLATFORM]; |
| 81 | } |
| 82 | |
| 83 | VulkanFunctions::VulkanFunctions() { |
| 84 | QLibrary library(GetVulkanLibrary()); |