|
Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
|
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>
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_ |
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.
| 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.
| textureAssetManager | Manager that owns texture asset records |
| meshAssetManager | Manager that owns mesh assets |
| materialAssetManager | Manager that owns material assets |
| modelAssetManager | Manager that owns model assets |
| skinAssetManager | Manager that owns skin assets |
| animationAssetManager | Manager that owns animation assets |
| audioAssetManager | Manager that owns audio asset records |
| assetLoaderPool | Thread pool used for asset loading work |
| assetManager | Optional asset manager for texture handle registry access |
| void Engine::Ecs::AssetImportPipeline::discardPendingWork | ( | ) |
Clears all queued and in-flight loading work in every sub-pipeline.
|
inline |
Gets the audio loading sub-pipeline.
Definition at line 100 of file AssetImportPipeline.h.
References audioPipeline_.
|
inline |
Gets the glTF model loading sub-pipeline.
Definition at line 95 of file AssetImportPipeline.h.
References modelPipeline_.
|
inline |
Gets the texture loading sub-pipeline.
Definition at line 90 of file AssetImportPipeline.h.
References texturePipeline_.
| 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.
| renderingDataManager | Pointer to the RenderingDataManager |
| 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.
| asset | relative path to the asset to load |
| void Engine::Ecs::AssetImportPipeline::tick | ( | bool | async = true | ) |
Advances all sub-pipelines in dependency order (texture, model, audio).
| async | Whether to run steps asynchronously |
|
private |
Definition at line 105 of file AssetImportPipeline.h.
Referenced by getAudioAssetPipeline().
|
private |
Definition at line 104 of file AssetImportPipeline.h.
Referenced by getModelAssetPipeline().
|
private |
Definition at line 103 of file AssetImportPipeline.h.
Referenced by getTextureAssetPipeline().