-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Use Nuklear for web - through canvas #79
Comments
I haven't tried, but dear imgui has pull request with example for Emscripten (using SDL2): ocornut/imgui#336 |
I got the SDL1.2 demo (SDL + SDL_gfx) work with Emscripten with very few modifications. Essentially I replaced the main function by emscripten_set_main_loop to avoid to block the browser thread. I didn't try with SDL/OpenGL yet. If @vurtun is ok, I could do a pull request to add this in the demo directory. |
@glegris could you please make a separate gist first? I'll have time first in 3 weeks, but I would very much like to take a look at it. |
First fully functional prototype using WebGL and offering an online demo: #164 . Now only a pure canvas solution (without WebGL and without glfw3) is missing. |
Nowadays, web sites are not any more documents, but rather pretty complex UI applications. On the other hand, it's extremely difficult to get it working on all screen sizes and DPIs. With Nuklear it would be piece of cake.
I was thinking about compiling Nuklear to JS using Emscripten and drawing everything immediately to HTML5 canvas. The only question is performance. But I'm pretty certain, it'll be sufficient and we'll finally have a proper tool for building UIs on the screwed web. Also for future, it'll be (significantly?) more performant thanks to WebAssembly, which allows highly optimized compilation from C.
Anyone has any hands-on experience?
The text was updated successfully, but these errors were encountered: