Wasm32 webgl calls w/o js interaction?

I'm using wasm32/webgl in a similar way to stdweb/main.rs at master · koute/stdweb · GitHub

Question: do these webgl calls go through js? If so, is there a way to make webgl calls directly from wasm32?

with current browsers all webgl (and other browser object) calls have to go through js; although it tends to be optimized very well, it's still a source of overhead

there's a host bindings proposal which will improve this in the future: interface-types/Explainer.md at main · WebAssembly/interface-types · GitHub

Yes, No. (Maybe in future it will change.)

It is possible to write more performant js code that calls into custom wasm. (vs that generated.) The unanswered question is whether such a change is insignificant or not. Don't know of anyone explicitly testing.

that's a good point—i'm not sure it's that much of an overall performance issue with modern GL use, which tends to limit the number of calls into the driver by using buffer objects and such—making it likely it will be bottlenecked on the GPU, not the CPU

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.