3 ms·
That API looks potentially more pleasant to use than WebGL, which is a nice surprise given it's purportedly more low-level.
by TazeTSchnitzel 10y ago
That API looks potentially more pleasant to use than WebGL, which is a nice surprise given it's purportedly more low-level.
- om2 10y agoThat's one of the benefits of designing an API for the web from the get-go, instead of just literally copying an API that's meant to be used from C. It makes for a cleaner and nicer API, even though some lower-level details are exposed.
- flohofwoe 10y agoIt's basically a webified Metal API, similar to how WebGL is a webified OpenGL, so I wouldn't say it was designed from the get-go for the web. And as far as I can see from the proposal, WebGPU will still be well usable from C (this is important for talking to it from asm.js / WebAssembly)
- om2 10y agoIt's Metal-inspired, but we tried to use JS API design idioms where possible. It does help that Metal is already an object-oriented design instead of bare functions passing around primitive values and structs.
- flohofwoe 10y agoHa, sorry I wasn't aware that you're on the WebGPU team when I replied. Please don't forget about us emscripten users, I'd love to give WebGPU a whirl with my C++ mini-3D-framework (http://www.github.com/floooh/oryol http://www.github.com/floooh/oryol), would be interesting how the C/C++ code would differ from the Metal rendering backend, and how performance compares to WebGL on one hand, and Metal / GL on the other.
- om2 10y agoI'm being a little generous to myselff with saying "we". I'm on the WebKit team and I followed this project but I wasn't personally involved in implementing it.
- TD-Linux 10y agoMaybe someone can enlighten me, but it doesn't actually look any more low level. The only lower level thing I see is the texture attachment load/store ops. Can you commit a command buffer more than once? (edit: I realized this API is mostly designed 1:1 with the Metal API, so the docs for that API have filled in most of the missing pieces)
- om2 10y agoYes, you can submit a command buffer more than once, with modified parameters.