Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
MaterialAsset.cpp
Go to the documentation of this file.
4
5namespace EngineCore {
6 MaterialAsset::MaterialAsset( const Asset::Path & assetPath, bool initWithDefaultData ) : AssetBase( initWithDefaultData )
7 {
8
9 }
10
12 {
13 AssetBase::unload();
15 }
16
18 {
19 if (data == entt::null)
20 {
22 return;
23 }
24
25 // Check for any of the material component types
26 // These are the actual material data classes used as ECS components (from MaterialData.h)
27 if (mainRegistry.any_of<
37 {
39 return;
40 }
41
42 // Entity exists but no material component yet - still loading
44 {
46 }
47 }
48} // namespace EngineCore
entt::entity data
Definition Asset.h:98
AssetBase(bool initializeDefaultEntity=false)
Definition Asset.h:52
CpuLoadingState loadingState
Definition Asset.h:95
entt::registry & mainRegistry
Definition Asset.h:97
Material data for an Object which displays a flat color.
Dynamic textures material with PBR and lightmap support.
L1 Spherical Harmoics shader.
MaterialAsset(const Asset::Path &assetPath, bool initWithDefaultData=false)
void unload() override
Unload data.
void updateLoadingState() override
Updates the loading state based on presence of material ECS components.
Moveable diffuse shader with PBR and lightmap support.
Material data for an object which displays its normals.
Static lightmap material with PBR support.
@ 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.