Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Asset::AssetBase Class Reference

Base class for asset wrappers. The data is stored in the private member variable 'data' in form of entt components. More...

#include <Asset.h>

Inheritance diagram for Asset::AssetBase:

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

Detailed Description

Base class for asset wrappers. The data is stored in the private member variable 'data' in form of entt components.

Author
Konstantin Passig
Date
03.12.2025

Definition at line 49 of file Asset.h.

Constructor & Destructor Documentation

◆ AssetBase()

Asset::AssetBase::AssetBase ( bool initializeDefaultEntity = false)
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().

Here is the caller graph for this function:

◆ ~AssetBase()

Asset::AssetBase::~AssetBase ( )
inlinevirtual

Definition at line 101 of file Asset.h.

References unload().

Here is the call graph for this function:

Member Function Documentation

◆ getEntity()

entt::entity Asset::AssetBase::getEntity ( ) const
inline

Getter for data.

Returns
data

Definition at line 125 of file Asset.h.

References data.

Referenced by EngineCore::RenderingDataManager::onTextureLoaded(), and Ecs::ModelAssetPipeline::processMeshData().

Here is the caller graph for this function:

◆ getLoadingState()

CpuLoadingState Asset::AssetBase::getLoadingState ( )
inlinenodiscard

Gets the loading state of this asset.

Returns
Returns the state of loading of this asset
Author
Konstantin Passig
Date
03.12.2025

Definition at line 106 of file Asset.h.

References loadingState, and updateLoadingState().

Referenced by EngineCore::MeshAsset::getMeshPrimitiveData(), and EngineCore::RenderingDataManager::uploadMaterialBuffers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ requestLoad()

void Asset::AssetBase::requestLoad ( )
inline

If this asset is in the UNLOADED state it will get added to the assets to load.

Date
2025-11-30
Author
Konstantin Passig

Definition at line 112 of file Asset.h.

References data, loadingState, mainRegistry, and Asset::REQUESTED_LOAD.

◆ unload()

void Asset::AssetBase::unload ( )
inlinevirtual

Base function for unloading the ecs data.

Author
Konstantin Passig
Date
03.12.2025

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().

Here is the caller graph for this function:

◆ updateLoadingState()

virtual void Asset::AssetBase::updateLoadingState ( )
inlineprotectedvirtual

Reimplemented in EngineCore::MaterialAsset, EngineCore::MeshAsset, EngineCore::ModelAsset, and EngineCore::TextureAsset.

Definition at line 92 of file Asset.h.

Referenced by getLoadingState().

Here is the caller graph for this function:

Member Data Documentation

◆ data

◆ loadingState

◆ mainRegistry


The documentation for this class was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Core/Asset.h