Cocoa: Select Vulkan surface extension at runtime

This mostly just follows the pattern established by X11.

Related to #1619.

(cherry picked from commit 15d91801b7)
This commit is contained in:
Camilla Löwy
2020-01-16 01:52:50 +01:00
committed by Camilla Löwy
parent 50f3979dfd
commit d33084447d
7 changed files with 58 additions and 77 deletions
-3
View File
@@ -128,13 +128,10 @@ GLFWbool _glfwInitVulkan(int mode)
else if (strcmp(ep[i].extensionName, "VK_KHR_win32_surface") == 0)
_glfw.vk.KHR_win32_surface = GLFW_TRUE;
#elif defined(_GLFW_COCOA)
#if defined(VK_USE_PLATFORM_MACOS_MVK)
else if (strcmp(ep[i].extensionName, "VK_MVK_macos_surface") == 0)
_glfw.vk.MVK_macos_surface = GLFW_TRUE;
#elif defined(VK_USE_PLATFORM_METAL_EXT)
else if (strcmp(ep[i].extensionName, "VK_EXT_metal_surface") == 0)
_glfw.vk.EXT_metal_surface = GLFW_TRUE;
#endif
#elif defined(_GLFW_X11)
else if (strcmp(ep[i].extensionName, "VK_KHR_xlib_surface") == 0)
_glfw.vk.KHR_xlib_surface = GLFW_TRUE;