Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Ecs::AssetImportPipeline Class Reference

Master asset import pipeline that dispatches asset submissions to the texture, model and audio sub-pipelines and advances them in a fixed order. More...

#include <AssetImportPipeline.h>

Collaboration diagram for Engine::Ecs::AssetImportPipeline:

Public Member Functions

 AssetImportPipeline (Assets::TextureAssetManager *textureAssetManager, Assets::MeshAssetManager *meshAssetManager, Assets::MaterialAssetManager *materialAssetManager, Assets::ModelAssetManager *modelAssetManager, Assets::SkinAssetManager *skinAssetManager, Assets::AnimationAssetManager *animationAssetManager, Assets::AudioAssetManager *audioAssetManager, NamedThreadPool *assetLoaderPool, Core::AssetManager *assetManager=nullptr)
 Create the master asset import pipeline and its sub-pipelines.
void submitAsset (const std::filesystem::path &asset)
 Submit a path to an asset for loading, dispatched to the correct sub-pipeline by extension.
void tick (bool async=true)
 Advances all sub-pipelines in dependency order (texture, model, audio).
void discardPendingWork ()
 Clears all queued and in-flight loading work in every sub-pipeline.
void setRenderingDataManager (Core::RenderingDataManager *renderingDataManager)
 Wires the RenderingDataManager into the sub-pipelines and links the model pipeline to this master for lightmap submission.
TextureAssetPipeline & getTextureAssetPipeline ()
 Gets the texture loading sub-pipeline.
ModelAssetPipeline & getModelAssetPipeline ()
 Gets the glTF model loading sub-pipeline.
AudioAssetPipeline & getAudioAssetPipeline ()
 Gets the audio loading sub-pipeline.

Private Attributes

TextureAssetPipeline texturePipeline_
ModelAssetPipeline modelPipeline_
AudioAssetPipeline audioPipeline_

Detailed Description

Master asset import pipeline that dispatches asset submissions to the texture, model and audio sub-pipelines and advances them in a fixed order.

The master owns the three sub-pipelines and is the single entry point for asset submission and per-frame ticking. The sub-pipelines keep the actual content extraction (json, tinygltf, exr, ktx2, wav ...) for their asset type.

Definition at line 37 of file AssetImportPipeline.h.

Constructor & Destructor Documentation

◆ AssetImportPipeline()

Engine::Ecs::AssetImportPipeline::AssetImportPipeline ( Assets::TextureAssetManager * textureAssetManager,
Assets::MeshAssetManager * meshAssetManager,
Assets::MaterialAssetManager * materialAssetManager,
Assets::ModelAssetManager * modelAssetManager,
Assets::SkinAssetManager * skinAssetManager,
Assets::AnimationAssetManager * animationAssetManager,
Assets::AudioAssetManager * audioAssetManager,
NamedThreadPool * assetLoaderPool,
Core::AssetManager * assetManager = nullptr )

Create the master asset import pipeline and its sub-pipelines.

Parameters
textureAssetManagerManager that owns texture asset records
meshAssetManagerManager that owns mesh assets
materialAssetManagerManager that owns material assets
modelAssetManagerManager that owns model assets
skinAssetManagerManager that owns skin assets
animationAssetManagerManager that owns animation assets
audioAssetManagerManager that owns audio asset records
assetLoaderPoolThread pool used for asset loading work
assetManagerOptional asset manager for texture handle registry access

Member Function Documentation

◆ discardPendingWork()

void Engine::Ecs::AssetImportPipeline::discardPendingWork ( )

Clears all queued and in-flight loading work in every sub-pipeline.

◆ getAudioAssetPipeline()

AudioAssetPipeline & Engine::Ecs::AssetImportPipeline::getAudioAssetPipeline ( )
inline

Gets the audio loading sub-pipeline.

Definition at line 100 of file AssetImportPipeline.h.

References audioPipeline_.

◆ getModelAssetPipeline()

ModelAssetPipeline & Engine::Ecs::AssetImportPipeline::getModelAssetPipeline ( )
inline

Gets the glTF model loading sub-pipeline.

Definition at line 95 of file AssetImportPipeline.h.

References modelPipeline_.

◆ getTextureAssetPipeline()

TextureAssetPipeline & Engine::Ecs::AssetImportPipeline::getTextureAssetPipeline ( )
inline

Gets the texture loading sub-pipeline.

Definition at line 90 of file AssetImportPipeline.h.

References texturePipeline_.

◆ setRenderingDataManager()

void Engine::Ecs::AssetImportPipeline::setRenderingDataManager ( Core::RenderingDataManager * renderingDataManager)

Wires the RenderingDataManager into the sub-pipelines and links the model pipeline to this master for lightmap submission.

Parameters
renderingDataManagerPointer to the RenderingDataManager

◆ submitAsset()

void Engine::Ecs::AssetImportPipeline::submitAsset ( const std::filesystem::path & asset)

Submit a path to an asset for loading, dispatched to the correct sub-pipeline by extension.

Parameters
assetrelative path to the asset to load

◆ tick()

void Engine::Ecs::AssetImportPipeline::tick ( bool async = true)

Advances all sub-pipelines in dependency order (texture, model, audio).

Parameters
asyncWhether to run steps asynchronously

Member Data Documentation

◆ audioPipeline_

AudioAssetPipeline Engine::Ecs::AssetImportPipeline::audioPipeline_
private

Definition at line 105 of file AssetImportPipeline.h.

Referenced by getAudioAssetPipeline().

◆ modelPipeline_

ModelAssetPipeline Engine::Ecs::AssetImportPipeline::modelPipeline_
private

Definition at line 104 of file AssetImportPipeline.h.

Referenced by getModelAssetPipeline().

◆ texturePipeline_

TextureAssetPipeline Engine::Ecs::AssetImportPipeline::texturePipeline_
private

Definition at line 103 of file AssetImportPipeline.h.

Referenced by getTextureAssetPipeline().


The documentation for this class was generated from the following file: