Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
MeshAsset.cpp
Go to the documentation of this file.
2
3namespace EngineCore
4{
5 MeshAsset::MeshAsset(bool initEcsData) : AssetBase(initEcsData) {
6
7 }
8
10 {
11 AssetBase::unload();
12 }
13
15 {
16 if ( data == entt::null )
17 {
19 return;
20 }
21
23 {
25 return;
26 }
27
28 // if we are here it is either LOADING or UNLOADED but the entity exists
30 {
32 }
33 }
34
40
41} // namespace EngineCore
entt::entity data
Definition Asset.h:98
AssetBase(bool initializeDefaultEntity=false)
Definition Asset.h:52
CpuLoadingState loadingState
Definition Asset.h:95
CpuLoadingState getLoadingState()
Gets the loading state of this asset.
Definition Asset.h:106
entt::registry & mainRegistry
Definition Asset.h:97
MeshAsset(bool initEcsData=false)
Definition MeshAsset.cpp:5
void updateLoadingState() override
Updates the loading state of the asset based on the existence of the ECS components.
Definition MeshAsset.cpp:14
Ecs::MeshPrimitiveData * getMeshPrimitiveData()
Gets the mesh data for this asset.
Definition MeshAsset.cpp:35
void unload() override
Unloads all data and clears the ecs objects.
Definition MeshAsset.cpp:9
@ LOADED
All components of the asset have been loaded, and it is ready to be used.
Definition Asset.h:39
@ LOADING
While the asset is currently being processed in the asset pipeline.
Definition Asset.h:35
@ UNLOADED
When the asset is not loaded yet but the frame is already existing for the heavy data to be loaded in...
Definition Asset.h:26
Log category system implementation.