Hello
Some updates:
I'm able to build all tests, in addition to fltk-options and fluid.
The latest example can be found here:
I've also uploaded the unittests wasm here:
I'm running into an issue with emscripten_sleep() which is called from Fl_Emscripten_System_Driver::wait(double). I sometimes run into an error when a popup or pulldown is shown which I'm guessing might be a data race I'm causing in Emscripten (unreachable code). I'll have to investigate further.
There are other things which require implementing but which face browser limitations:
multithreaded C/C++ supporting code compiles into a SharedArrayBuffer which most browsers have put limitations on. It requires enabling from the server that's serving wasm files.
Clipboard access also requires clipboard api permissions.
Native file dialogs must be spawned from html, not javascript (can be simulated though but requires spawning an input element with type "file").
Emscripten supports compiling a virtual filesystem into the binary using preload-file. So currently I have FLTK's filechooser access that, while I think of a way to access the client's filesystem via an input element.
Even with the ability to choose a file from the client, reading the file using the browser's filereader requires that the file be chosen explicitly using the input element.
Printer support can only be done via the browser's print() functionality, which is limited to the current HTMLDocument.
I tried building FLTK with OpenGL support, emscripten translates OpenGL calls to Webgl calls automatically. However that's limited to a common subset of calls shared with GLES apparently. Even when enabling Emscripten's LEGACY_GL_EMULATION, some calls aren't supported like glPushAttrib, glPopAttrib, glCopyPixels and some others.