LoaderDesc#
Fully qualified name: 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 = nullptr#
See also
-
DestroyLoadParametersFn destroyLoadParameters = nullptr#
See also
-
HashLoadParametersFn hashLoadParameters = nullptr#
See also
-
LoadParametersEqualsFn loadParametersEquals = nullptr#
See also
-
HashAssetFn hashAsset = nullptr#
See also
-
CreateContextFn createContext = nullptr#
See also
-
DestroyContextFn destroyContext = nullptr#
See also
-
CreateDependenciesFn createDependencies = nullptr#
See also
-
DestroyDependenciesFn destroyDependencies = nullptr#
See also
-
OnDependencyChangedFn onDependencyChanged = nullptr#
See also
-
LoadAssetFn loadAsset#