carb::assets::AssetTypeParams

Defined in carb/assets/AssetsTypes.h

struct AssetTypeParams

Parameters that describe an asset type’s characteristics.

Public Members

size_t sizeofThis

Must be initialized to sizeof(AssetTypeParams). This is used as a version for future expansion of this struct.

uint32_t maxConcurrency

The maximum number of outstanding concurrent loads of this asset type. A value of 0 indicates “unlimited.” A value of 1 indicates that loading is not thread-safe and only one asset may be loading at a given time. Any other value limits the number of loading assets for the given type. (default=0)

bool autoReload

Specifies that the assets should automatically reload when the file or one of its dependencies changes. If this is false, you must call IAssets::reloadAnyDirty() in order to manually trigger a reload. (default=true)

uint32_t reloadDelayMs

The amount of time in milliseconds to delay when automatically reloading an asset. This is because a reload is triggered immediately when a change is detected from the datasource. A filesystem for example can trigger multiple change notifications for a write to a file. This value gives a sliding window of changes so that all changes that happen within the window get condensed into a single reload. (default=100 ms)

Public Static Functions

static inline constexpr AssetTypeParams getDefault()

Returns the default values for AssetTypeParams.

Returns

Default values.