kripken/emscripten — Issue #253: Frame-based application
Author: crazyjul
Created: 2012-02-14 17:38:30+00:00
State: open

This issue is more a base issue than a bug in the system.

My c++ engine is nearly completely running in javascript ( + opengles ). But I face a subtle problem :

- The javascript thread should return soon enough, so the browser doesn't think it is stalled.
- I use technique similar to glutDisplayFunc ( using setTimeOut and like ).

But :
- The main should return
- When it has returned, it detroys every c++ object.

My fix : I comment the exiting code at the end of the main function.

It would be interesting to have a skeleton ( using specific C++ function and bound javascript code ) that would allow to run exit code when wanted.

Any ideas? If no, I'll give it a try