Loader - (Game Development Resource Management)
Resource Loader member variables details.
res::ResourceManager< Asset > * resmgr;
resmgr is the resource manager that the loader is associated with.
ext is the name of file extension the loader is responsible of loading.
LoaderContext member variables:
- LoaderContext is a data structure that contains important information passed to the loader via manager so that the loader can load the resource into the correct list.
AssetList * reslist
reslist is the list the asset should be stored in.
name is the name of the file. The name is parsed from the filename. is purpose is to serve as the name for the loaded resource.
ext is the name of the file extension, which is also parsed from the filename.
LoaderContext Member functions:
virtual Asset * Load(const LoaderContext& info, ds::astring const& filename) = 0;
This is the function responsible for loading the resource. This function will obviously need to be override by the objec that implements it.
- @param (const LoaderContext& context) : contains important information passed to the loader via Manager.
- @param (ds::astring const& filename) : is the name of the file to load.
continuation article -> Resource Manager - (Game Development Resource Management)