You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⭐ Successfully built and tested demo/sdl_opengles2.
Everything works as expected. Untested with INCLUDE_ALL.
❌Successfully built demo/sdl_renderer.
Launch is currently unsuccessful, since opening index.html results in an infinite loading loop. But I didn't take many attempts.
Bad News
Standard examples (Nuklear/example/) based on GLEW/GLFW do not build due to glMapBuffer and glUnmapBuffer calls.
1.1 The issue is described here issues/319.
1.2 There is an interesting PR Reduce differences between the OpenGL 3 and OpenGL ES 2 demos #873 that introduces a have_mapbuffer flag, but it is always true. As a temporary workaround, its value could be set based on the __EMSCRIPTEN__ macro.
1.3 This PR will only fix demos including demo/glfw_opengl3, but the our examples (based on GLFW/OpenGL3 too) remain unchanged.
Some work on Emscripten support has already been done by @DeXP:
1.1. In the old repository, this PR added sdl_opengles2 and a web rule to Makefile.
1.2. About 10 years ago, a live version was created, but it is no longer maintained.
I believe, for sdl3_renderer, it may also make sense to add a web rule in the Makefile to improve consistency.
The first step in integrating Emscripten is to choose the backend. See the report below.
Emscripten Integration Report
Good News
demo/sdl3_renderer.Everything works, including builds with
INCLUDE_ALL. However, this requires either merging the small PR fix(style_configurator): fix unsafe int to nk_bool pointer casts #883 or manually fixing it by adjusting field types.demo/sdl_opengles2.Everything works as expected. Untested with
INCLUDE_ALL.demo/sdl_renderer.Launch is currently unsuccessful, since opening
index.htmlresults in an infinite loading loop. But I didn't take many attempts.Bad News
Nuklear/example/) based onGLEW/GLFWdo not build due toglMapBufferandglUnmapBuffercalls.1.1 The issue is described here issues/319.
1.2 There is an interesting PR Reduce differences between the OpenGL 3 and OpenGL ES 2 demos #873 that introduces a
have_mapbufferflag, but it is alwaystrue. As a temporary workaround, its value could be set based on the__EMSCRIPTEN__macro.1.3 This PR will only fix demos including
demo/glfw_opengl3, but the our examples (based onGLFW/OpenGL3too) remain unchanged.sdl3_rendereras the Emscripten backend, we cannot include demo/common/file_browser.c, since theicon_loaduses direct OpenGL calls. This is already fixed in Support the file browser with more demos #590.Notes
1.1. In the old repository, this PR added
sdl_opengles2and awebrule toMakefile.1.2. About 10 years ago, a live version was created, but it is no longer maintained.
sdl3_renderer, it may also make sense to add awebrule in theMakefileto improve consistency.