How can I know if it is ok to call main? Is there something my JS code can listen to that will notify me that I can call main? Or should I just call main repeatedly until it works?
On Wednesday, July 30, 2014 at 7:03:44 PM UTC-3, Alon Zakai wrote: > > You should only call main() when things are ready to execute, and some > things are asynchronous (like file preloading, or the .mem init file > loading), so this can be confusing. It is therefore best to let emscripten > call main for you, instead of doing it yourself. If you want to do it > yourself, the best way is to replace your main() with a function that > notifies you it is ok to call main(), and then you can call your real main > some time after that (but not before). > > - Alon > > > > On Wed, Jul 30, 2014 at 5:59 AM, wolfviking0 <[email protected] > <javascript:>> wrote: > >> Hi, >> >> I have sometime this error when I start my 3D Engine. >> >> Inside my JS settings I use this Module['noInitialRun'] = true; for >> choose when I want start the Engine. >> >> I call Module['callMain'](Module['arguments']); for launch. >> >> May be I don't use rightly the function. Any suggestion about this error ? >> >> Tony >> >> -- >> You received this message because you are subscribed to the Google Groups >> "emscripten-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
