Glfw: Metal backend

Created on 24 Mar 2019  路  2Comments  路  Source: glfw/glfw

Does this make sense at all? Or is it possible to use Metal right now on Mac?

My use case is that the NanoVG OpenGL backend runs too slow on MacOS 10.14 since Apple has nurfed their OpenGL drivers in that version. A Vulkan NanoVG fork exists as an experiment but is not complete. The Metal NanoVG fork is much more mature, so it makes sense for me to use Metal directly instead of Vulkan with the MoltenVK feature in GLFW.

Metal macOS

Most helpful comment

It's possible to use Metal with GLFW right now. The native access functions will give you all the objects you need to hook up Metal.

All 2 comments

It's possible to use Metal with GLFW right now. The native access functions will give you all the objects you need to hook up Metal.

It's not yet on master branch, but you can see a simple example of Metal usage at https://github.com/glfw/glfw/blob/metal-guide/examples/metal.m.

There's also a Metal via GLFW example written in Go at https://gotools.org/dmitri.shuralyov.com/gpu/mtl/example/movingtriangle.

Was this page helpful?
0 / 5 - 0 ratings