4 ms·
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=
by azakai 10y 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_browser.py#L2371 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_started/Tutorial.html#generating-html http://kripken.github.io/emscripten-site/docs/getting_starte...