--- rendererloader.cc 2026-07-10 03:44:45.000000000 +0800 +++ rendererloader.cc 2026-08-05 10:35:11.000000000 +0800 @@ -24,11 +24,6 @@ #include "camperror.h" #ifdef __APPLE__ -// Include glfw3.h with Vulkan support BEFORE renderBase.h, which includes -// it with GLFW_INCLUDE_NONE. This ensures we get both the Vulkan types -// (PFN_vkGetInstanceProcAddr) and the glfwInitVulkanLoader declaration. -#define VK_NO_PROTOTYPES -#define GLFW_INCLUDE_VULKAN #include #endif @@ -558,22 +553,6 @@ // If user wants Vulkan, try to load the shared library first. if (useVulkan) { if (tryLoadVulkanLib()) { -#ifdef __APPLE__ - // GLFW lazily calls dlopen("libvulkan.1.dylib") inside - // glfwCreateWindowSurface to get vkGetInstanceProcAddr. - // In a portable/staged build the bundled Vulkan loader's - // install name is "@executable_path/lib/libvulkan.1.dylib", - // so that bare-name dlopen fails on a machine without the SDK. - // Fix: hand GLFW the function pointer from our already-loaded - // Vulkan loader so it never needs to dlopen it itself. - { - PFN_vkGetInstanceProcAddr pfn = - (PFN_vkGetInstanceProcAddr)dlsym( - vulkanLibHandle, "vkGetInstanceProcAddr"); - if (pfn) - glfwInitVulkanLoader(pfn); - } -#endif // __APPLE__ return; } // Vulkan failed to load; fall through to try OpenGL.