01-15-2023, 04:09 AM
Hi!
Glad to know you have it working :-)
As you can see, the single main difference is that the main loop doesn't exist isnide main() function anymore, but is a delegate function set up by the new API call TLN_SetMainTask(). That's because how the browser calls javascript code. Being single-threaded, it means you can't call a function that doesn't return control to the javascript engine, a delegate callback must be used. This new mechanism is also implemented inside the Tilengine window, so the updated samples will also run when compiled to native C applications. The rest of the API is the same.
Glad to know you have it working :-)
As you can see, the single main difference is that the main loop doesn't exist isnide main() function anymore, but is a delegate function set up by the new API call TLN_SetMainTask(). That's because how the browser calls javascript code. Being single-threaded, it means you can't call a function that doesn't return control to the javascript engine, a delegate callback must be used. This new mechanism is also implemented inside the Tilengine window, so the updated samples will also run when compiled to native C applications. The rest of the API is the same.