|
Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
|
Base class for asset wrappers. The data is stored in the private member variable 'data' in form of entt components. More...
#include <Asset.h>
Public Member Functions | |
| AssetBase (bool initializeDefaultEntity=false) | |
| Creates a base asset and optionally allocates its default ECS entity. | |
| virtual | ~AssetBase () |
| Releases base asset resources. | |
| CpuLoadingState | getLoadingState () |
| Gets the loading state of this asset. | |
| void | requestLoad () |
| If this asset is in the UNLOADED state it will get added to the assets to load. | |
| virtual void | unload () |
| Base function for unloading the ecs data. | |
| entt::entity | getEntity () const |
| Getter for data. | |
Protected Member Functions | |
| virtual void | updateLoadingState () |
| Updates loadingState from derived asset data. | |
Protected Attributes | |
| CpuLoadingState | loadingState = UNLOADED |
| Current CPU loading state. | |
| entt::registry & | mainRegistry |
| Registry that owns this asset's ECS data. | |
| entt::entity | data |
| Entity containing the asset's component data. | |
Base class for asset wrappers. The data is stored in the private member variable 'data' in form of entt components.
|
inlineexplicit |
Creates a base asset and optionally allocates its default ECS entity.
| initializeDefaultEntity | True to start loading and create an entity immediately. |
Definition at line 303 of file Asset.h.
References data, Asset::LOADING, loadingState, mainRegistry, and Asset::UNLOADED.
|
virtual |
Releases base asset resources.
| entt::entity Asset::AssetBase::getEntity | ( | ) | const |
Getter for data.
|
nodiscard |
Gets the loading state of this asset.
| void Asset::AssetBase::requestLoad | ( | ) |
If this asset is in the UNLOADED state it will get added to the assets to load.
|
virtual |
Base function for unloading the ecs data.
Reimplemented in Engine::Assets::Audio, Engine::Assets::Material, Engine::Assets::Mesh, and Engine::Assets::Texture.
|
inlineprotectedvirtual |
Updates loadingState from derived asset data.
Reimplemented in Engine::Assets::Audio, Engine::Assets::Material, Engine::Assets::Mesh, and Engine::Assets::Texture.
|
protected |
Entity containing the asset's component data.
Definition at line 347 of file Asset.h.
Referenced by AssetBase(), and Engine::Assets::Material::getData().
|
protected |
|
protected |
Registry that owns this asset's ECS data.
Definition at line 346 of file Asset.h.
Referenced by AssetBase(), and Engine::Assets::Material::getData().