Add Emscripten support for SDL2 and SDL3 surface examples

This commit is contained in:
moonpower
2026-03-13 15:49:21 +01:00
parent 6575c02cac
commit dc4a1d294d
9 changed files with 163 additions and 1 deletions
+10
View File
@@ -31,3 +31,13 @@ c++ `pkg-config --cflags sdl3` -I .. -I ../.. -I ../../backends \
main.cpp ../../backends/imgui_impl_sdl3.cpp ../../backends/imgui_impl_sdlsurface3.cpp ../../imgui*.cpp \
-framework Cocoa -framework IOKit -framework CoreVideo `pkg-config --libs sdl3`
```
## Emscripten
Use `Makefile.emscripten`:
```sh
source /path/to/emsdk/emsdk_env.sh
make -f Makefile.emscripten
```
This produces `web/index.html`, `web/index.js`, and `web/index.wasm`.