mach icon indicating copy to clipboard operation
mach copied to clipboard

system_sdk: Vulkan and OpenGL cross compilation

Open emidoots opened this issue 3 years ago • 0 comments

The Mach system SDKs should include what is necessary for mach-glfw to cross-compile when using Vulkan and OpenGL. This likely just requires including the right libraries etc. in the system SDKs. Currently included is:

  • MacOS: Everything for GLFW, OpenGL and Metal development. Missing Vulkan development.
  • Linux: Everything for GLFW. Missing OpenGL and Vulkan development.
  • Windows: Zig includes OpenGL support I believe. Missing Vulkan.

This work will be easy to reuse for anybody wishing to cross-compile / build their own OpenGL/Vulkan code in Zig as well. See https://github.com/hexops/mach/blob/main/glfw/system_sdk.zig

Other things that I've heard from the incredible @Snektron regarding Vulkan cross compilation:

By the way, i can let you on in on a secret, and that is if you wish to impress andrew you can make a completely static linux binary by integrating the amdvlk stack directly

I also have GenerateStep.initFromSdk [in vulkan-zig] which can help you fetch vk.xml, "which might also be interesting to know for your system sdk setup

emidoots avatar Oct 31 '21 17:10 emidoots