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

#include <AssetManager.h>

Collaboration diagram for EngineCore::AssetManager:

Classes

class  MaterialData
 Storage for material data on the cpu side. More...

Public Member Functions

 AssetManager ()
 AssetManager (ApplicationContext *context)
 ~AssetManager ()
void attachToRenderer (Renderer *renderer)
 Sets what renderer the render process belongs to.
void setRenderingDataManager (RenderingDataManager *renderingDataManager)
 Sets the RenderingDataManager on asset pipelines for hook notifications.
void loadEcsModel (const std::filesystem::path &path)
 Submits a gltf model for loading. You provide the path of the model to load. This can include 3D data, materials and textures.
MeshAssetgetMeshAsset (const Asset::Path &asset)
 Get a mesh from the asset manager. If it does not exist it requests the asset from the asset loader.
void loadEcsTexture (const std::filesystem::path &path)
 Loads a texture (.png / .jpg / .exr)
uint32_t getTextureDescriptorIndex (const std::filesystem::path &path)
 Gets the descriptor index of a loaded texture by path.
std::vector< const Mesh * > getAllMeshes () const
 Gets a copy of all meshes which are currently loaded in the asset manager.
uint32_t getTotalPrimitiveCount () const
bool doesMeshAlreadyExist (const std::filesystem::path &meshPath) const
 Checks if a mesh is already present in the loaded meshes in RAM.
uint32_t getImageCount () const
void logAllLoadedAssets () const
void reloadMeshOffsets ()
void cleanup ()
std::vector< VkDescriptorImageInfo > getTextureDescriptorInfos () const
uint32_t getShaderCount () const
std::vector< MaterialShader * > getShaders () const
PipelineNames materialNameFromString (const std::string &string)
MaterialShadergetShaderByName (const std::string &shaderName)
MaterialShadergetShaderByName (const PipelineNames &shaderName)
std::unordered_map< Mesh *, uint32_t > getMeshOffsets () const
std::vector< Texture * > getTexturesToUpload ()
uint32_t getMeshOffset (Mesh *mesh) const
MaterialShaderregisterShader (MaterialShader shader, const PipelineNames &materialName)
void unregisterShader (MaterialShader *shader)
VulkanBuffergetMaterialStorageBufferByName (PipelineNames name)
Ecs::TextureAssetPipelinegetTextureAssetPipeline ()
Ecs::ModelAssetPipelinegetMeshAssetPipeline ()
void unloadAllData () const
MeshAssetgetMeshAsset (const Asset::Path &asset) const
MaterialAssetManagergetMaterialAssetManager () const
 Gets the material asset manager for material lookups.
ModelAssetManagergetModelAssetManager () const
 Gets the model asset manager for model/GLTF file loading state lookups.
MeshAssetManagergetMeshAssetManager () const
 Gets the mesh asset manager for mesh asset lookups.
TextureHandleRegistrygetTextureHandleRegistry ()
 Gets the texture handle registry for O(1) descriptor index lookups.
NamedThreadPoolgetCalculationPool () const
NamedThreadPoolgetAssetLoaderPool () const

Private Member Functions

std::vector< const MeshPrimitive * > getMeshPrimitivesFromMeshes (const std::vector< const Mesh * > &meshes) const
std::vector< MeshPrimitive * > getMeshPrimitivesFromMeshes (const std::vector< Mesh * > &meshes)
uint32_t getMeshletCount (const std::vector< const Mesh * > &meshes) const
template<typename T>
void initMaterialStorageBuffer (PipelineNames name, uint32_t materialCount)
template<typename T>
uint32_t addMaterialData (T data)
bool doesTextureAlreadyExist (const std::filesystem::path &path)
 Checks if a texture has already been loaded.
TextureregisterTexture (const std::filesystem::path &path, Texture texture)
 Registers a texture with the texture manager which prevents the same texture from being loaded twice.
void unregisterTexture (Texture *texture)
MeshregisterMesh (const std::filesystem::path &path, GltfLoader::GltfMeshData &gltfMeshData)
void unregisterMesh (Mesh *mesh)

Private Attributes

friend ApplicationContext
friend RenderingDataManager
NamedThreadPoolthreadPool = new NamedThreadPool( 4, "Asset Loader" )
NamedThreadPoolthreadedCalculation = new NamedThreadPool( 10, "Bounding Sphere" )
TextureAssetManagertextureAssetManager
Ecs::TextureAssetPipeline texturePipeline
MeshAssetManagermeshAssetManager
MaterialAssetManagermaterialAssetManager
ModelAssetManagermodelAssetManager
TextureHandleRegistry textureHandleRegistry_
 Registry for type-safe texture handles.
Ecs::ModelAssetPipeline modelAssetPipeline
std::vector< CpuMeshDatacpuMeshData
std::vector< UnifiedMeshletmeshlets
std::vector< MeshletBoundsmeshletBounds
std::vector< ObjectCullingDataobjectCullingData
std::vector< PrimitiveMeshletDataobjectMeshletData
GltfLoader gltfLoader = GltfLoader( threadPool )
std::unordered_map< PipelineNames, VulkanBuffermaterialStorageBuffers
DescriptorIndexAllocator shaderAllocator = DescriptorIndexAllocator( 100 )
std::array< std::optional< MaterialShader >, 100 > shaderData
std::vector< MaterialShader * > shaders
std::unordered_map< PipelineNames, MaterialShader * > shadersByName
std::unordered_map< MaterialShader *, uint32_t > shaderOffsets
ApplicationContextcontext = nullptr
Rendererrenderer = nullptr
std::unordered_map< std::filesystem::path, Texture *, PathHashertextures = {}
BidirectionalMap< uint32_t, Texture * > textureIndexMap
BidirectionalMap< uint32_t, Mesh * > meshIndexMap
std::array< std::optional< Texture >, MAX_TEXTURE_COUNTtextureData
DescriptorIndexAllocator textureAllocator
std::mutex textureMutex
std::mutex meshesMutex
std::array< std::optional< Mesh >, MAX_MESH_COUNTmeshData {}
DescriptorIndexAllocator meshAllocator
std::unordered_map< std::filesystem::path, Mesh *, PathHashermeshes = {}
bool bIsMeshDirty = true
std::unordered_map< Mesh *, uint32_t > meshOffsets
std::vector< TextureStoragetexturesToUpload {}
std::vector< Texture * > texturesToCopyImageData

Detailed Description

Definition at line 122 of file AssetManager.h.

Constructor & Destructor Documentation

◆ AssetManager() [1/2]

◆ AssetManager() [2/2]

◆ ~AssetManager()

EngineCore::AssetManager::~AssetManager ( )

Member Function Documentation

◆ addMaterialData()

template<typename T>
uint32_t EngineCore::AssetManager::addMaterialData ( T data)
private
Deprecated

Definition at line 453 of file AssetManager.h.

References FUNCTION_DEPRECATED_RETURN.

◆ attachToRenderer()

void EngineCore::AssetManager::attachToRenderer ( Renderer * renderer)

Sets what renderer the render process belongs to.

Parameters
rendererWhere the render process belongs to
Date
2025-05-28
Author
Konstantin Passig

Definition at line 52 of file AssetManager.cpp.

References renderer.

◆ cleanup()

void EngineCore::AssetManager::cleanup ( )

Definition at line 127 of file AssetManager.cpp.

References materialStorageBuffers, meshAllocator, meshData, meshes, textureData, and textures.

◆ doesMeshAlreadyExist()

bool EngineCore::AssetManager::doesMeshAlreadyExist ( const std::filesystem::path & meshPath) const

Checks if a mesh is already present in the loaded meshes in RAM.

Parameters
meshPathPath to the mesh. This will be used as the key to the map which check whether it already exists. So try to use relative paths
Returns
Whether a mesh already exists in the loaded meshes so that it does not get loaded twice
Date
2025-05-28
Author
Konstantin Passig

Definition at line 107 of file AssetManager.cpp.

References meshes.

◆ doesTextureAlreadyExist()

bool EngineCore::AssetManager::doesTextureAlreadyExist ( const std::filesystem::path & path)
private

Checks if a texture has already been loaded.

Parameters
paththe path of the texture on disk
Returns
if the texture has been found in the loaded data

Definition at line 290 of file AssetManager.cpp.

References textureMutex, textures, and TRACY_LOCK_GUARD.

◆ getAllMeshes()

std::vector< const Mesh * > EngineCore::AssetManager::getAllMeshes ( ) const
nodiscard

Gets a copy of all meshes which are currently loaded in the asset manager.

Returns
copy of all meshes which are loaded in the asset manager

Definition at line 88 of file AssetManager.cpp.

References meshAllocator, and meshData.

Referenced by getTotalPrimitiveCount().

Here is the caller graph for this function:

◆ getAssetLoaderPool()

NamedThreadPool * EngineCore::AssetManager::getAssetLoaderPool ( ) const
inline

Definition at line 333 of file AssetManager.h.

References threadPool.

◆ getCalculationPool()

NamedThreadPool * EngineCore::AssetManager::getCalculationPool ( ) const
inline

Definition at line 328 of file AssetManager.h.

References threadedCalculation.

◆ getImageCount()

uint32_t EngineCore::AssetManager::getImageCount ( ) const

Definition at line 391 of file AssetManager.cpp.

References textures.

◆ getMaterialAssetManager()

MaterialAssetManager * EngineCore::AssetManager::getMaterialAssetManager ( ) const
inlinenodiscard

Gets the material asset manager for material lookups.

Returns
Pointer to the material asset manager
Author
Konstantin Passig
Date
2025-12-18

Definition at line 257 of file AssetManager.h.

References materialAssetManager.

Referenced by EngineCore::RenderingDataManager::collectMaterialsFromScene(), EngineCore::RenderingDataManager::updatePrimitiveData(), EngineCore::RenderingDataManager::updatePrimitiveDataInstanced(), and EngineCore::RenderingDataManager::uploadMaterialBuffers().

Here is the caller graph for this function:

◆ getMaterialStorageBufferByName()

VulkanBuffer & EngineCore::AssetManager::getMaterialStorageBufferByName ( PipelineNames name)

Definition at line 220 of file AssetManager.cpp.

References materialStorageBuffers.

◆ getMeshAsset() [1/2]

MeshAsset * EngineCore::AssetManager::getMeshAsset ( const Asset::Path & asset)

Get a mesh from the asset manager. If it does not exist it requests the asset from the asset loader.

Parameters
assetWhich asset to look for
Returns
Pointer to the asset or nullptr if the asset didnt exist yet
Author
Konstantin Passig
Date
07.12.2025

Definition at line 71 of file AssetManager.cpp.

References Asset::Path::getFilePath(), loadEcsModel(), and meshAssetManager.

Referenced by EngineCore::MeshComponent::MeshComponent().

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

◆ getMeshAsset() [2/2]

MeshAsset * EngineCore::AssetManager::getMeshAsset ( const Asset::Path & asset) const
nodiscard

Definition at line 285 of file AssetManager.cpp.

References meshAssetManager, and EngineCore::UnpackOptional().

Here is the call graph for this function:

◆ getMeshAssetManager()

MeshAssetManager * EngineCore::AssetManager::getMeshAssetManager ( ) const
inlinenodiscard

Gets the mesh asset manager for mesh asset lookups.

Returns
Pointer to the mesh asset manager
Author
Konstantin Passig
Date
2026-01-14

Definition at line 281 of file AssetManager.h.

References meshAssetManager.

Referenced by EngineCore::RenderingDataManager::processCompletedMeshletGenerations().

Here is the caller graph for this function:

◆ getMeshAssetPipeline()

Ecs::ModelAssetPipeline & EngineCore::AssetManager::getMeshAssetPipeline ( )

Definition at line 272 of file AssetManager.cpp.

References modelAssetPipeline.

◆ getMeshletCount()

uint32_t EngineCore::AssetManager::getMeshletCount ( const std::vector< const Mesh * > & meshes) const
private

Definition at line 251 of file AssetManager.cpp.

References meshes.

◆ getMeshOffset()

uint32_t EngineCore::AssetManager::getMeshOffset ( Mesh * mesh) const

Definition at line 193 of file AssetManager.cpp.

References meshOffsets.

◆ getMeshOffsets()

std::unordered_map< Mesh *, uint32_t > EngineCore::AssetManager::getMeshOffsets ( ) const
inline

Definition at line 231 of file AssetManager.h.

References meshOffsets.

◆ getMeshPrimitivesFromMeshes() [1/2]

std::vector< const MeshPrimitive * > EngineCore::AssetManager::getMeshPrimitivesFromMeshes ( const std::vector< const Mesh * > & meshes) const
private

Definition at line 224 of file AssetManager.cpp.

References meshes.

◆ getMeshPrimitivesFromMeshes() [2/2]

std::vector< MeshPrimitive * > EngineCore::AssetManager::getMeshPrimitivesFromMeshes ( const std::vector< Mesh * > & meshes)
private

Definition at line 238 of file AssetManager.cpp.

References meshes.

◆ getModelAssetManager()

ModelAssetManager * EngineCore::AssetManager::getModelAssetManager ( ) const
inlinenodiscard

Gets the model asset manager for model/GLTF file loading state lookups.

Returns
Pointer to the model asset manager
Author
Konstantin Passig
Date
2026-01-13

Definition at line 269 of file AssetManager.h.

References modelAssetManager.

◆ getShaderByName() [1/2]

MaterialShader * EngineCore::AssetManager::getShaderByName ( const PipelineNames & shaderName)

Definition at line 181 of file AssetManager.cpp.

References shadersByName.

◆ getShaderByName() [2/2]

MaterialShader * EngineCore::AssetManager::getShaderByName ( const std::string & shaderName)

Definition at line 176 of file AssetManager.cpp.

References getShaderByName(), and materialNameFromString().

Referenced by getShaderByName().

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

◆ getShaderCount()

uint32_t EngineCore::AssetManager::getShaderCount ( ) const

Definition at line 164 of file AssetManager.cpp.

References shaders.

◆ getShaders()

std::vector< MaterialShader * > EngineCore::AssetManager::getShaders ( ) const

Definition at line 168 of file AssetManager.cpp.

References shaders.

◆ getTextureAssetPipeline()

Ecs::TextureAssetPipeline & EngineCore::AssetManager::getTextureAssetPipeline ( )

Definition at line 268 of file AssetManager.cpp.

References texturePipeline.

◆ getTextureDescriptorIndex()

uint32_t EngineCore::AssetManager::getTextureDescriptorIndex ( const std::filesystem::path & path)
nodiscard

Gets the descriptor index of a loaded texture by path.

Parameters
pathPath to the texture (relative or absolute)
Returns
Descriptor index if texture is loaded, 0xFFFFFFFF otherwise
Date
2026-01-21
Author
Konstantin Passig

Definition at line 295 of file AssetManager.cpp.

References textureMutex, textures, and TRACY_LOCK_GUARD.

Referenced by EngineCore::RenderingDataManager::getValidTextureIndex(), EngineCore::RenderingDataManager::onTextureLoaded(), and EngineCore::RenderingDataManager::uploadMaterialBuffers().

Here is the caller graph for this function:

◆ getTextureDescriptorInfos()

std::vector< VkDescriptorImageInfo > EngineCore::AssetManager::getTextureDescriptorInfos ( ) const

Definition at line 151 of file AssetManager.cpp.

References textureData.

◆ getTextureHandleRegistry()

TextureHandleRegistry * EngineCore::AssetManager::getTextureHandleRegistry ( )
inlinenodiscard

Gets the texture handle registry for O(1) descriptor index lookups.

Returns
Pointer to the texture handle registry
Author
Konstantin Passig
Date
2026-01-22

Definition at line 293 of file AssetManager.h.

References textureHandleRegistry_.

Referenced by EngineCore::RenderingDataManager::initializeDefaultTextures(), EngineCore::RenderingDataManager::onTextureLoaded(), and EngineCore::RenderingDataManager::uploadMaterialBuffers().

Here is the caller graph for this function:

◆ getTexturesToUpload()

std::vector< Texture * > EngineCore::AssetManager::getTexturesToUpload ( )

Definition at line 189 of file AssetManager.cpp.

References texturesToCopyImageData.

◆ getTotalPrimitiveCount()

uint32_t EngineCore::AssetManager::getTotalPrimitiveCount ( ) const
nodiscard

Definition at line 99 of file AssetManager.cpp.

References getAllMeshes().

Here is the call graph for this function:

◆ initMaterialStorageBuffer()

template<typename T>
void EngineCore::AssetManager::initMaterialStorageBuffer ( PipelineNames name,
uint32_t materialCount )
private

Definition at line 434 of file AssetManager.h.

References context, EngineCore::MaterialShader::getPipelineNameFromString(), and materialStorageBuffers.

Here is the call graph for this function:

◆ loadEcsModel()

void EngineCore::AssetManager::loadEcsModel ( const std::filesystem::path & path)

Submits a gltf model for loading. You provide the path of the model to load. This can include 3D data, materials and textures.

Parameters
pathWhere the gltf file is

Definition at line 61 of file AssetManager.cpp.

References modelAssetManager, modelAssetPipeline, and TRACY_ZONE_SCOPED_NAMED.

Referenced by getMeshAsset(), and EngineCore::GltfSpawner::spawnAll().

Here is the caller graph for this function:

◆ loadEcsTexture()

void EngineCore::AssetManager::loadEcsTexture ( const std::filesystem::path & path)

Loads a texture (.png / .jpg / .exr)

Parameters
pathwhere the texture is
Author
Konstantin Passig
Date
07.12.2025

Definition at line 82 of file AssetManager.cpp.

References textureAssetManager, texturePipeline, and TRACY_ZONE_SCOPED_NAMED.

Referenced by EngineCore::RenderingDataManager::initializeDefaultTextures().

Here is the caller graph for this function:

◆ logAllLoadedAssets()

void EngineCore::AssetManager::logAllLoadedAssets ( ) const

Definition at line 111 of file AssetManager.cpp.

References meshes, and textures.

◆ materialNameFromString()

PipelineNames EngineCore::AssetManager::materialNameFromString ( const std::string & string)

Definition at line 172 of file AssetManager.cpp.

References EngineCore::DIFFUSE_FLAT_COLOR.

Referenced by getShaderByName().

Here is the caller graph for this function:

◆ registerMesh()

Mesh * EngineCore::AssetManager::registerMesh ( const std::filesystem::path & path,
GltfLoader::GltfMeshData & gltfMeshData )
private

Definition at line 344 of file AssetManager.cpp.

References context, EngineCore::Mesh::createMeshName(), EngineCore::GltfLoader::GltfMeshData::getName(), meshAllocator, meshData, meshes, meshesMutex, meshIndexMap, renderer, TRACY_LOCK_GUARD, and TRACY_ZONE_SCOPED_NAMED.

Here is the call graph for this function:

◆ registerShader()

MaterialShader * EngineCore::AssetManager::registerShader ( MaterialShader shader,
const PipelineNames & materialName )

Definition at line 197 of file AssetManager.cpp.

References shaderAllocator, shaderData, shaderOffsets, shaders, and shadersByName.

◆ registerTexture()

Texture * EngineCore::AssetManager::registerTexture ( const std::filesystem::path & path,
Texture texture )
private

Registers a texture with the texture manager which prevents the same texture from being loaded twice.

Parameters
pathpath to the texture
texturethe texture to register
Returns
pointer to a usable texture object

Definition at line 304 of file AssetManager.cpp.

References EngineCore::Texture::createResources(), EngineCore::Texture::descriptorIndex, renderer, textureAllocator, textureData, textureIndexMap, textureMutex, textures, and TRACY_LOCK_GUARD.

Referenced by EngineCore::RenderingDataManager::onTextureLoaded().

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

◆ reloadMeshOffsets()

void EngineCore::AssetManager::reloadMeshOffsets ( )

Definition at line 116 of file AssetManager.cpp.

References meshData, and meshOffsets.

◆ setRenderingDataManager()

void EngineCore::AssetManager::setRenderingDataManager ( RenderingDataManager * renderingDataManager)

Sets the RenderingDataManager on asset pipelines for hook notifications.

Parameters
renderingDataManagerPointer to the RenderingDataManager
Date
2026-01-15
Author
Konstantin Passig

Definition at line 56 of file AssetManager.cpp.

References modelAssetPipeline, RenderingDataManager, and texturePipeline.

◆ unloadAllData()

void EngineCore::AssetManager::unloadAllData ( ) const

◆ unregisterMesh()

void EngineCore::AssetManager::unregisterMesh ( Mesh * mesh)
private

◆ unregisterShader()

void EngineCore::AssetManager::unregisterShader ( MaterialShader * shader)

Definition at line 209 of file AssetManager.cpp.

References shaderData, shaderOffsets, and shaders.

◆ unregisterTexture()

void EngineCore::AssetManager::unregisterTexture ( Texture * texture)
private

Definition at line 329 of file AssetManager.cpp.

References textureData, textureIndexMap, textureMutex, textures, and TRACY_LOCK_GUARD.

Member Data Documentation

◆ ApplicationContext

friend EngineCore::AssetManager::ApplicationContext
private

Definition at line 124 of file AssetManager.h.

Referenced by AssetManager().

◆ bIsMeshDirty

bool EngineCore::AssetManager::bIsMeshDirty = true
private

Definition at line 426 of file AssetManager.h.

◆ context

ApplicationContext* EngineCore::AssetManager::context = nullptr
private

Definition at line 385 of file AssetManager.h.

Referenced by AssetManager(), initMaterialStorageBuffer(), and registerMesh().

◆ cpuMeshData

std::vector<CpuMeshData> EngineCore::AssetManager::cpuMeshData
private

Definition at line 315 of file AssetManager.h.

◆ gltfLoader

GltfLoader EngineCore::AssetManager::gltfLoader = GltfLoader( threadPool )
private

Definition at line 339 of file AssetManager.h.

◆ materialAssetManager

MaterialAssetManager* EngineCore::AssetManager::materialAssetManager
private

◆ materialStorageBuffers

std::unordered_map<PipelineNames, VulkanBuffer> EngineCore::AssetManager::materialStorageBuffers
private

◆ meshAllocator

DescriptorIndexAllocator EngineCore::AssetManager::meshAllocator
private

Definition at line 423 of file AssetManager.h.

Referenced by AssetManager(), AssetManager(), cleanup(), getAllMeshes(), and registerMesh().

◆ meshAssetManager

MeshAssetManager* EngineCore::AssetManager::meshAssetManager
private

◆ meshData

std::array<std::optional<Mesh>, MAX_MESH_COUNT> EngineCore::AssetManager::meshData {}
private

◆ meshes

std::unordered_map<std::filesystem::path, Mesh *, PathHasher> EngineCore::AssetManager::meshes = {}
private

◆ meshesMutex

std::mutex EngineCore::AssetManager::meshesMutex
private

Definition at line 417 of file AssetManager.h.

Referenced by registerMesh(), and unregisterMesh().

◆ meshIndexMap

BidirectionalMap<uint32_t, Mesh *> EngineCore::AssetManager::meshIndexMap
private

Definition at line 390 of file AssetManager.h.

Referenced by AssetManager(), registerMesh(), and unregisterMesh().

◆ meshletBounds

std::vector<MeshletBounds> EngineCore::AssetManager::meshletBounds
private

Definition at line 318 of file AssetManager.h.

◆ meshlets

std::vector<UnifiedMeshlet> EngineCore::AssetManager::meshlets
private

Definition at line 317 of file AssetManager.h.

◆ meshOffsets

std::unordered_map<Mesh *, uint32_t> EngineCore::AssetManager::meshOffsets
private

Definition at line 427 of file AssetManager.h.

Referenced by getMeshOffset(), getMeshOffsets(), reloadMeshOffsets(), and unregisterMesh().

◆ modelAssetManager

ModelAssetManager* EngineCore::AssetManager::modelAssetManager
private

◆ modelAssetPipeline

Ecs::ModelAssetPipeline EngineCore::AssetManager::modelAssetPipeline
private

◆ objectCullingData

std::vector<ObjectCullingData> EngineCore::AssetManager::objectCullingData
private

Definition at line 319 of file AssetManager.h.

◆ objectMeshletData

std::vector<PrimitiveMeshletData> EngineCore::AssetManager::objectMeshletData
private

Definition at line 320 of file AssetManager.h.

◆ renderer

Renderer* EngineCore::AssetManager::renderer = nullptr
private

Definition at line 386 of file AssetManager.h.

Referenced by attachToRenderer(), registerMesh(), and registerTexture().

◆ RenderingDataManager

friend EngineCore::AssetManager::RenderingDataManager
private

Definition at line 125 of file AssetManager.h.

Referenced by setRenderingDataManager().

◆ shaderAllocator

DescriptorIndexAllocator EngineCore::AssetManager::shaderAllocator = DescriptorIndexAllocator( 100 )
private

Definition at line 378 of file AssetManager.h.

Referenced by registerShader().

◆ shaderData

std::array<std::optional<MaterialShader>, 100> EngineCore::AssetManager::shaderData
private

Definition at line 379 of file AssetManager.h.

Referenced by registerShader(), and unregisterShader().

◆ shaderOffsets

std::unordered_map<MaterialShader *, uint32_t> EngineCore::AssetManager::shaderOffsets
private

Definition at line 383 of file AssetManager.h.

Referenced by registerShader(), and unregisterShader().

◆ shaders

std::vector<MaterialShader *> EngineCore::AssetManager::shaders
private

Definition at line 380 of file AssetManager.h.

Referenced by getShaderCount(), getShaders(), registerShader(), and unregisterShader().

◆ shadersByName

std::unordered_map<PipelineNames, MaterialShader *> EngineCore::AssetManager::shadersByName
private

Definition at line 381 of file AssetManager.h.

Referenced by getShaderByName(), and registerShader().

◆ textureAllocator

DescriptorIndexAllocator EngineCore::AssetManager::textureAllocator
private

Definition at line 393 of file AssetManager.h.

Referenced by AssetManager(), AssetManager(), and registerTexture().

◆ textureAssetManager

TextureAssetManager* EngineCore::AssetManager::textureAssetManager
private

◆ textureData

std::array<std::optional<Texture>, MAX_TEXTURE_COUNT> EngineCore::AssetManager::textureData
private

◆ textureHandleRegistry_

TextureHandleRegistry EngineCore::AssetManager::textureHandleRegistry_
private

Registry for type-safe texture handles.

Definition at line 311 of file AssetManager.h.

Referenced by getTextureHandleRegistry().

◆ textureIndexMap

BidirectionalMap<uint32_t, Texture *> EngineCore::AssetManager::textureIndexMap
private

Definition at line 389 of file AssetManager.h.

Referenced by AssetManager(), registerTexture(), and unregisterTexture().

◆ textureMutex

std::mutex EngineCore::AssetManager::textureMutex
private

◆ texturePipeline

Ecs::TextureAssetPipeline EngineCore::AssetManager::texturePipeline
private

◆ textures

std::unordered_map<std::filesystem::path, Texture *, PathHasher> EngineCore::AssetManager::textures = {}
private

◆ texturesToCopyImageData

std::vector<Texture *> EngineCore::AssetManager::texturesToCopyImageData
private

Definition at line 430 of file AssetManager.h.

Referenced by getTexturesToUpload().

◆ texturesToUpload

std::vector<TextureStorage> EngineCore::AssetManager::texturesToUpload {}
private

Definition at line 429 of file AssetManager.h.

◆ threadedCalculation

NamedThreadPool* EngineCore::AssetManager::threadedCalculation = new NamedThreadPool( 10, "Bounding Sphere" )
private

Definition at line 300 of file AssetManager.h.

Referenced by getCalculationPool(), and ~AssetManager().

◆ threadPool

NamedThreadPool* EngineCore::AssetManager::threadPool = new NamedThreadPool( 4, "Asset Loader" )
private

Definition at line 299 of file AssetManager.h.

Referenced by AssetManager(), AssetManager(), getAssetLoaderPool(), and ~AssetManager().


The documentation for this class was generated from the following files:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Mesh/AssetManager.h
  • /home/magerbeton/Documents/gl3-vulkan/Engine/src/Engine/Mesh/AssetManager.cpp