Defined in carb/assets/AssetsTypes.h

CARB_ASSET(t, majorVersion, minorVersion)

Registers an asset type.

The version is used to protect the LoadParameter class as it’s definition could change thereby causing undefined behavior if the asset loader version doesn’t match the users of that loader. Therefore, the version should be updated any time the LoadParameters is update to avoid runtime issues.

Note the additional two parameters which specify the version of the Asset, in this case the imaging asset is version 1.0. This value should only need to be updated if the LoadParmeters structure is updated.

  • t – The type of the asset to register

  • majorVersion – The major version of the asset type.

  • minorVersion – The minor version of the asset type.