![]() ![]() |
||
Home | Features | Roadmap | Learn | Documentation | ||
Latest release Tramway SDK 0.1.1 Github Download Installer (win64) Portable .zip (win64) Starter Template Quick links Home Get Started |
AsyncThe Async system lets you do stuff... asynchronously. On a separate worker thread. This meant that the main logic thread can be freed up from certain computations and in general makes the framework go vroom vroom. Currently the async system supports Resource loading. In the future it will get some more functionality, but it's only resources for now. To use it, you need to initialize the system. This will start up the worker threads. The system needs to be updated in the main loop and then shut down. Unfortunately, it seems like multithreading still doesn't work in webassembly builds, so you will have to do resource loading entirely from the main thread. Resource streamingLet's take the Model resource as an example. It is derived from the Resource class and implements its API.
Most of the time while loading the Model is spent retrieving it from the
disk and parsing it. All of the relevant logic is implemented in the
Due to a quirk in the OpenGL API, we need to perform all of the data uploads
to the GPU from the main thread. The relevant logic for this is implemented
in the Example![]() This is what happens when you call the SetModel() method on a RenderComponent and if the Model isn't loaded yet. What happens when you assign a Model to a RenderComponent?
Programming in C++
It is possible to request a resource to be loaded by calling the
If you want to create a progress bar which displays the process of resource
loading, you can use |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|