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
@@ -33,3 +33,13 @@ c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends \
main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_sdlsurface2.cpp ../../imgui*.cpp \
`sdl2-config --libs`
```
## Emscripten
Use `Makefile.emscripten`:
```sh
source /path/to/emsdk/emsdk_env.sh
make -f Makefile.emscripten
```
This makes `web/index.html`, `web/index.js`, and `web/index.wasm`.