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
+1 -1
View File
@@ -105,7 +105,7 @@ List of high-level Frameworks Backends (combining Platform + Renderer):
imgui_impl_null.cpp
Emscripten is also supported!
The SDL2+GL, SDL3+GL, GLFW+GL and GLFW+WebGPU examples are all ready to build and run with Emscripten.
The SDL2+GL, SDL3+GL, SDL2+Surface, SDL3+Surface, GLFW+GL and GLFW+WebGPU examples are all ready to build and run with Emscripten.
### Recommended Backends
+2
View File
@@ -148,6 +148,7 @@ This requires SDL 2.0.18+ (released November 2021) <BR>
[example_sdl2_surface/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_surface/) <BR>
SDL2 (Win32, Mac, Linux, etc.) + SDL_Surface CPU renderer example.<BR>
= main.cpp + imgui_impl_sdl2.cpp + imgui_impl_sdlsurface2.cpp <BR>
This supports building with Emscripten.<BR>
[example_sdl2_vulkan/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_vulkan/) <BR>
SDL2 (Win32, Mac, Linux, etc.) + Vulkan example. <BR>
@@ -185,6 +186,7 @@ SDL3 (Win32, Mac, Linux, etc.) + SDL_Renderer for SDL3 example.<BR>
[example_sdl3_surface/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl3_surface/) <BR>
SDL3 (Win32, Mac, Linux, etc.) + SDL_Surface CPU renderer example.<BR>
= main.cpp + imgui_impl_sdl3.cpp + imgui_impl_sdlsurface3.cpp <BR>
This supports building with Emscripten.<BR>
[example_sdl3_vulkan/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl3_vulkan/) <BR>
SDL3 (Win32, Mac, Linux, etc.) + Vulkan example. <BR>