4 ms·
SDL API is used to interface with HTML5 canvas operations so that SDL doesn't need to be compiled: the entire SDL API is literally a primitive in your browser.
by gnulinux 3y ago
SDL API is used to interface with HTML5 canvas operations so that SDL doesn't need to be compiled: the entire SDL API is literally a primitive in your browser.
- a1o 3y agoThat is not true, SDL2 port is written in C and it has to be compiled. Here's where it's built https://github.com/emscripten-core/emscripten/blob/main/tools/ports/sdl2.py https://github.com/emscripten-core/emscripten/blob/main/tool...
- versteegen 3y agoHalf true. Emscripten implements (much of) the SDL 1.2 (and also SDL_mixer 1.2) API in Javascript here: https://github.com/emscripten-core/emscripten/blob/main/src/library_sdl.js https://github.com/emscripten-core/emscripten/blob/main/src/.... On the other hand SDL 2 (and SDL_mixer 2) are proper ports (which you linked to). So there's quite a size penalty to using SDL 2 rather than SDL 1.2, but the reimplemented SDL[_mixer] 1.2 is incomplete and differs from official.
- deleted 3y ago[deleted]