carb::assets::LoaderDesc
Defined in carb/assets/AssetsTypes.h
-
struct LoaderDesc
Defines the loader functions for an asset type.
The following is the basic call order for loader functions (for clarity, parameters have been simplified).
When an asset is being loaded for the first time, or reloaded:
context = createContext ? createContext() : nullptr; dependencies = createDependencies ? createDependencies() : nullptr; if (dependencies) { // dependencies are processed destroyDependencies(dependencies); } hash = hashAsset(); // If the hash is already loaded then return that already loaded asset, otherwise: asset = loadAsset(); if (context) destroyContext(context);
When the asset is destroyed:
unloadAsset(asset)
Public Members
-
LoadAssetFn loadAsset
See also
-
UnloadAssetFn unloadAsset
See also
-
CreateLoadParametersFn createLoadParameters
See also
-
DestroyLoadParametersFn destroyLoadParameters
See also
-
HashLoadParametersFn hashLoadParameters
See also
-
LoadParametersEqualsFn loadParametersEquals
See also
-
HashAssetFn hashAsset
See also
-
CreateContextFn createContext
See also
-
DestroyContextFn destroyContext
See also
-
CreateDependenciesFn createDependencies
See also
-
DestroyDependenciesFn destroyDependencies
See also
-
OnDependencyChangedFn onDependencyChanged
See also
-
LoadAssetFn loadAsset