111 - Resource Refactor (Part III)
Channel: StableCoder
Date: 26/07/2021

This session continues and finalizes the refactor on physics's 'collision shape' resource.

The first part focuses on getting asynchronous loading working again. It use to be the responsibility of the 'loader' class, however because of the import/load split earlier, and the responsibility of loading shifted to individual resources again, the responsibility for creating these asynchronous tasks must fall to the resources themselves.

Unfortunately, having no cental authority for async items could cause absolute havok. So some order is imposed by having the SimulationState track asynchronous tasks through the use of a shared mutex for when modificiations need to occur to the SimulationState, especially if those modiciations would directly impact those systems, pools or resources.

After that, cleanup of the refactor begins, with changes to where resources can access the import/load and unload functions through a pointer kept by their pool as opposed to individually.



2021/06/23