-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider adding a function/helper for creating WebGPU surfaces #8912
Comments
This requires us to bring in a hard dependency on WebGPU, right? If so, this is probably more a candidate for a README-webgpu.md than an API we’d add. There are lots of third party toolkits that we don’t directly support that are pretty easy to add glue for like this. @icculus, thoughts? |
Only a header part of it. It might look kind of like SDL_opengl.h. Seeing how OpenGL context creation is actually implemented is a bit scary, though (didn't know it was that complex). For WebGPU it's much easier, and I think that you might require the user to bring in their own webgpu.h? But this probably might not be how SDL does things... but you probably wouldn't want to generate your own webgpu.h... |
I have to read up on this more; eventually we're going to end up with WebGPU in the renderer and/or the GPU API, for Emscripten if not other platforms, so we might end up with a tiny helper API, like we did for Vulkan. |
Sounds good to me! In Dawn, |
Emscripten is not WASM, it's a toolchain, please consider making all WebGPU related work toolchain agnostic, so it's easier to use from languages other than C/C++ It's ok to expect users to manually write JS glue code, it's more portable this way |
Hello.
I've been playing with WebGPU and SDL recently and one of the problems was creating a surface you can render to with SDL.
I've found this implementation which works fine, but I feel like it would be nice to include something like this in SDL since creating OpenGL context is a lot easier than creating a WebGPU "context" (actually wgpu/Dawn manages that, but you still need to bring the code to "glue" WebGPU and SDL together).
Feel free to close the issue if it seems "out of scope" for SDL. :)
The text was updated successfully, but these errors were encountered: