Learn WebGPU for native graphics in C++ (with GLFW)

Work in progress article on learning WebGPU with cross platform native graphics in C++ using GLFW (work in progress, note that I am not the author).

Do you or anyone else know if there are any plans to incorporate the WebGPU extension or some other WebGPU support into GLFW at some point?

I am investigating WebGPU as a replacement for Skia and would ideally like to keep using GLFW.

The linked article uses GLFW for window creation and events, along with a very small set of functions which use the GLFW native interface to create a WebGPU surface.

So you can keep using GLFW along with the above code.

Thanks for the response.

Context: I am using F# with my own custom bindings to GLFW’s released binaries.

I saw that they are using GLFW already, but are you saying that their little C++ extension library is just using functions already exposed in GLFW to implement the WebGPU interfacing? So I could simply port their C++ code to use my GLFW bindings and whatever WebGPU bindings I end up using?

Yes, they’ve not altered GLFW but just use the GLFW native interface. So you can add a binding for their function glfwGetWGPUSurface (there is only the one function they have created for WebGPU as far as I can tell).