eliemichel / WebGPU-Cpp

A single-file zero-overhead C++ idiomatic wrapper for WebGPU native
https://eliemichel.github.io/WebGPU-Cpp/
MIT License
281 stars 17 forks source link

Enable async procedures to use function pointer + user data pointer instead of std::function #13

Open eliemichel opened 4 months ago

eliemichel commented 4 months ago

Currently, async functions, i.e., functions that take as last parameters a callback and user data pointer, are translated in the cpp wrapper into a std::function, but one may sometimes want to be able to access the original lower level function pointer + user data pointer signature. We should then generate an overload of these async fonctions that exposes such an API.