News for hackers. Stuff that matters.
Re:Emscripten/HTML integration tips by flohofwoe on Monday February 27, 2017 @04:57PM (#13748666)
Thanks for the hint about the device pixel ratio, I haven't thought of that (although it's 'accidentally alright' if on HighDPI devices rendering doesn't happen at full resolution since the GPUs often don't have enough fillrate).

The function implementations are fairly easy to find in the emscripten SDK, e.g.:

emscripten_get_element_css_size(): [1]

emscripten_hide_mouse(): [2]

It's also very easy to inject your own JS 'inline' into C/C++ in case the standard functions don't quite do the right thing with EM_ASM: [3]

[1] https://github.com/kripken/emscripten/blob/6dc4ac5f9e4d8484e...

[2] https://github.com/kripken/emscripten/blob/6dc4ac5f9e4d8484e...

[3] https://kripken.github.io/emscripten-site/docs/porting/conne...

There are no comments on this comment yet.