glTF-SDK icon indicating copy to clipboard operation
glTF-SDK copied to clipboard

Target webassembly

Open unicomp21 opened this issue 4 years ago • 1 comments

From a procgen perspective, ie generating assets within the browser, being able to compile gltf sdk as webassembly would be "huge".

unicomp21 avatar Aug 04 '19 13:08 unicomp21

We've experimented with compiling glTF-SDK as webassembly some time ago. The good news is that very few changes are required to get everything building and working (just a few minor changes to the CMakeList.txt files). You could easily do this in a fork of the repo.

Bringing the changes back into master branch would be more problematic as many of the unit tests fail due to having dependencies on external file and resources. Also, updating the DevOps build to install and use emscripten was more effort than we wanted to spend on functionality that we didn't intend to use in the short term.

Finally, you will likely need to write custom std::iostream derived types to interface between the wasm module and browser environment which could be tricky depending on the level of performance you need.

chriche-ms avatar Aug 14 '19 09:08 chriche-ms

Fixed with #127.

bghgary avatar Dec 07 '23 19:12 bghgary