Drag[en]gine Game Engine  1.0
deResourceLoader.h File Reference


class  deResourceLoader
 Resource Loader. Loads resources asynchronously. To load a resource a scripting module places a load request. Requests are processed using a pool of worker threads and once finished are promoted to the retrieval queue. The scripting module has to query the resource loader during each frame update for new entries in the retrieval queue. Once there are no more entries in the queue the scripting module can carry on with the fram update. Requests for the same resource are grouped together and placed in the retrieval queue only once. The scripting module is responsible to track multiple requests for the same resource. A resource is uniquely identified by the path and resource type. This informations are also returned in retrieval queries and can be used to match up with one or more requests made by the game scripts. The pause loading flag indicates if loading of new resources is put at hold. This is used during crash recovery breaks to avoid threads loading resources in the background causing havok. Changing the flag to false blocks until all threads still loading a resource have finished. More...