|
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 52 of file Asset.h.
References data, Asset::LOADING, loadingState, mainRegistry, and Asset::UNLOADED.
Referenced by EngineCore::MaterialAsset::MaterialAsset(), EngineCore::MeshAsset::MeshAsset(), and EngineCore::TextureAsset::TextureAsset().
|
inlinevirtual |
|
inline |
Getter for data.
Definition at line 125 of file Asset.h.
References data.
Referenced by EngineCore::RenderingDataManager::onTextureLoaded(), and Ecs::ModelAssetPipeline::processMeshData().
|
inlinenodiscard |
Gets the loading state of this asset.
Definition at line 106 of file Asset.h.
References loadingState, and updateLoadingState().
Referenced by EngineCore::MeshAsset::getMeshPrimitiveData(), and EngineCore::RenderingDataManager::uploadMaterialBuffers().
|
inline |
If this asset is in the UNLOADED state it will get added to the assets to load.
Definition at line 112 of file Asset.h.
References data, loadingState, mainRegistry, and Asset::REQUESTED_LOAD.
|
inlinevirtual |
Base function for unloading the ecs data.
Reimplemented in EngineCore::MaterialAsset, EngineCore::MeshAsset, EngineCore::ModelAsset, and EngineCore::TextureAsset.
Definition at line 118 of file Asset.h.
References data, loadingState, mainRegistry, and Asset::UNLOADED.
Referenced by ~AssetBase().
|
inlineprotectedvirtual |
Reimplemented in EngineCore::MaterialAsset, EngineCore::MeshAsset, EngineCore::ModelAsset, and EngineCore::TextureAsset.
Definition at line 92 of file Asset.h.
Referenced by getLoadingState().
|
protected |
Definition at line 98 of file Asset.h.
Referenced by AssetBase(), EngineCore::MaterialAsset::getData(), getEntity(), EngineCore::MeshAsset::getMeshPrimitiveData(), EngineCore::GltfTextureAsset::GltfTextureAsset(), Ecs::ModelAssetPipeline::processMaterial(), Ecs::ModelAssetPipeline::processMeshData(), requestLoad(), EngineCore::ExrTextureAsset::setHeader(), EngineCore::TextureAsset::setImage(), unload(), EngineCore::MaterialAsset::updateLoadingState(), EngineCore::MeshAsset::updateLoadingState(), and EngineCore::TextureAsset::updateLoadingState().
|
protected |
Definition at line 95 of file Asset.h.
Referenced by AssetBase(), getLoadingState(), EngineCore::GltfTextureAsset::GltfTextureAsset(), requestLoad(), unload(), EngineCore::MaterialAsset::updateLoadingState(), EngineCore::MeshAsset::updateLoadingState(), EngineCore::ModelAsset::updateLoadingState(), and EngineCore::TextureAsset::updateLoadingState().
|
protected |
Definition at line 97 of file Asset.h.
Referenced by AssetBase(), EngineCore::MaterialAsset::getData(), EngineCore::MeshAsset::getMeshPrimitiveData(), requestLoad(), EngineCore::ExrTextureAsset::setHeader(), EngineCore::TextureAsset::setImage(), unload(), EngineCore::MaterialAsset::updateLoadingState(), EngineCore::MeshAsset::updateLoadingState(), and EngineCore::TextureAsset::updateLoadingState().