|
Vulkan Schnee 0.0.1
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) | |
| virtual | ~AssetBase () |
| 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 () |
Protected Attributes | |
| CpuLoadingState | loadingState = UNLOADED |
| entt::registry & | mainRegistry |
| entt::entity | data |
Base class for asset wrappers. The data is stored in the private member variable 'data' in form of entt components.
|
inlineexplicit |
Definition at line 170 of file Asset.h.
References data, Asset::LOADING, loadingState, mainRegistry, and Asset::UNLOADED.
|
inlinevirtual |
|
inline |
|
inlinenodiscard |
Gets the loading state of this asset.
Definition at line 215 of file Asset.h.
References loadingState, and updateLoadingState().
|
inline |
If this asset is in the UNLOADED state it will get added to the assets to load.
Definition at line 221 of file Asset.h.
References data, loadingState, mainRegistry, and Asset::REQUESTED_LOAD.
|
inlinevirtual |
Base function for unloading the ecs data.
Reimplemented in Engine::Assets::Audio, Engine::Assets::Material, Engine::Assets::Mesh, and Engine::Assets::Texture.
Definition at line 227 of file Asset.h.
References data, loadingState, mainRegistry, and Asset::UNLOADED.
Referenced by ~AssetBase().
|
inlineprotectedvirtual |
Reimplemented in Engine::Assets::Audio, Engine::Assets::Material, Engine::Assets::Mesh, and Engine::Assets::Texture.
Definition at line 201 of file Asset.h.
Referenced by getLoadingState().
|
protected |
Definition at line 207 of file Asset.h.
Referenced by AssetBase(), Engine::Assets::Material::getData(), getEntity(), requestLoad(), and unload().
|
protected |
Definition at line 204 of file Asset.h.
Referenced by AssetBase(), getLoadingState(), requestLoad(), and unload().
|
protected |
Definition at line 206 of file Asset.h.
Referenced by AssetBase(), Engine::Assets::Material::getData(), requestLoad(), and unload().