Hacker News new | ask | show | jobs
by azakai 3401 days ago
There is already SDL2 support for emscripten, and emscripten can compile to WebAssembly with the WASM flag flipped on. So basically just use emcc with

-s WASM=1 -s USE_SDL=2

for WebAssembly + SDL2.

The test_sdl2* tests in emscripten's test suite have working samples in them,

https://github.com/kripken/emscripten/blob/master/tests/test...

A full SDL1 testcase is in the tutorial,

http://kripken.github.io/emscripten-site/docs/getting_starte...