Are you going to implement support for WebGPU for C/C++ apps?

We won’t be building an implementation of WebGPU from scratch (such as Dawn or wgpu did), if that was the question.

But you can definitely use WebGPU with SDL. One can use SDL for all the window management, input, audio, etc and use WebGPU with the SDL-created window, the same way that one can with Direct3D, etc now. I haven’t tried it, but I assume one could use Dawn for this purpose.

In addition to that, we are building a 3D API of our own for SDL3. Its goals are similar to what WebGPU is planning, but is focusing on simplicity and portability as primary features.

The FAQ for that is here. One of the things SDL will be able to use behind the scenes, eventually, is WebGPU. This will be a requirement for Emscripten builds that want to run C/C++ on the web using this new API if nothing else.

1 Like

This is great, if only I could use it! But as you know I can’t migrate to SDL3 because it doesn’t support OpenGLES 1.1, which I need for glLogicOp(). You did once hint that you might reconsider that decision, but I presume nothing has come of it.

Thanks for the answer. I see that my question was a little bit silly. I always used OpenGL or Vulkan backend and proper option in SDL_CreateWindow. That is why I thought that there should be an option for WebGPU as well. Now I see that Dawn is taking care of proper initialization of any backend and SDL will just create window (creation of the context is on Dawn). I will try to run SDL+Dawn+WebGPU.

I regret that you are not trying to use WebGPU Shading Language as it is almost finalized (or maybe I am wrong). As you said they and you have the same goals. Both WebGPU Shading Language and yours SDL Shading Language looks very similar to me. Both are inspired by Rust. The compiler of WebGPU Shading Language will be probably good optimized over time and for free to use. No need to work hard to make your own.

The imposter syndrome is strong with this one :crazy_face:

The point of SDLSL is a language whose compiler can easily be integrated into SDL, have a relatively small footprint, and not need extra work to get it to build. Adding external dependencies can be a real hassle.