|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
The model asset pipeline loads a gltf scene and loads and loads the mesh and material data. The material data requests the textures it needs. More...
#include <FrameProcessing.h>
Public Member Functions | |
| ModelAssetPipeline (Assets::MeshAssetManager *meshAssetManager, Assets::MaterialAssetManager *materialAssetManager, Assets::ModelAssetManager *modelAssetManager, Assets::TextureAssetManager *textureAssetManager, NamedThreadPool *assetLoaderPool, Core::AssetManager *assetManager=nullptr) | |
| void | submitAsset (const std::filesystem::path &asset) |
| Requests the load of a gltf file. | |
| void | tick (bool async=true) |
| void | setRenderingDataManager (Core::RenderingDataManager *renderingDataManager) |
| Sets the RenderingDataManager to notify when meshes/materials are loaded. | |
| void | setTextureAssetPipeline (TextureAssetPipeline *pipeline) |
| Sets the TextureAssetPipeline for async lightmap loading. | |
| std::vector< CompletedMeshletGeneration > | takePendingMeshletCompletions () |
| Get and clear pending meshlet completions. Call this at a safe point to retrieve completed meshlet generations that need to be written to the registry. | |
| bool | hasPendingWork () const |
| Check if the pipeline still has in-flight work (loading, meshlet generation, etc.) Used to defer buffer rebuilds until all meshes from a model have finished processing. | |
| void | discardPendingWork () |
Private Member Functions | |
| void | submitLoadModel (bool async=true) |
| void | processModel (bool async=true) |
| void | processSkinData (bool async=true) |
| void | processMaterial (bool async=true) |
| void | processMeshData (bool async=true) |
| void | processKtx2Textures (bool async=true) |
| void | processTextures (Assets::Model *modelAsset, const std::shared_ptr< tinygltf::Model > &model, const std::filesystem::path &modelPath) |
| Extracts and registers texture assets from loaded glTF models. | |
The model asset pipeline loads a gltf scene and loads and loads the mesh and material data. The material data requests the textures it needs.
Definition at line 106 of file FrameProcessing.h.
|
explicit |
References assetLoaderPool, materialAssetManager, meshAssetManager, modelAssetManager, and textureAssetManager.
| void Engine::Ecs::ModelAssetPipeline::discardPendingWork | ( | ) |
|
inlinenodiscard |
Check if the pipeline still has in-flight work (loading, meshlet generation, etc.) Used to defer buffer rebuilds until all meshes from a model have finished processing.
Definition at line 153 of file FrameProcessing.h.
References assetQueue_, materialResults, meshletGenerationFutures, modelLoadingFutures_, pendingKtx2Futures_, pendingMeshletCompletions_, and primitiveDataFutures.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Extracts and registers texture assets from loaded glTF models.
Called during processModel() to extract images from model.images[] and create GltfTextureAsset entries in the TextureAssetManager.
| modelAsset | The model asset containing the loaded tinygltf::Model |
| modelPath | Path to the glTF file for resolving texture paths |
|
inline |
Sets the RenderingDataManager to notify when meshes/materials are loaded.
| renderingDataManager | Pointer to the RenderingDataManager |
Definition at line 132 of file FrameProcessing.h.
References renderingDataManager_.
|
inline |
Sets the TextureAssetPipeline for async lightmap loading.
| pipeline | Pointer to the TextureAssetPipeline |
Definition at line 138 of file FrameProcessing.h.
References textureAssetPipeline_.
| void Engine::Ecs::ModelAssetPipeline::submitAsset | ( | const std::filesystem::path & | asset | ) |
Requests the load of a gltf file.
| asset | path to the asset to load. Only use relative paths! |
|
private |
| std::vector< CompletedMeshletGeneration > Engine::Ecs::ModelAssetPipeline::takePendingMeshletCompletions | ( | ) |
Get and clear pending meshlet completions. Call this at a safe point to retrieve completed meshlet generations that need to be written to the registry.
| void Engine::Ecs::ModelAssetPipeline::tick | ( | bool | async = true | ) |
|
private |
Definition at line 210 of file FrameProcessing.h.
Referenced by ModelAssetPipeline().
|
private |
For TextureHandleRegistry access.
Definition at line 192 of file FrameProcessing.h.
|
private |
Definition at line 198 of file FrameProcessing.h.
Referenced by hasPendingWork().
|
private |
Definition at line 196 of file FrameProcessing.h.
|
private |
Definition at line 188 of file FrameProcessing.h.
Referenced by ModelAssetPipeline().
|
private |
Definition at line 200 of file FrameProcessing.h.
Referenced by hasPendingWork().
|
private |
Definition at line 187 of file FrameProcessing.h.
Referenced by ModelAssetPipeline().
|
private |
Definition at line 202 of file FrameProcessing.h.
Referenced by hasPendingWork().
|
private |
Definition at line 189 of file FrameProcessing.h.
Referenced by ModelAssetPipeline().
|
private |
Definition at line 199 of file FrameProcessing.h.
Referenced by hasPendingWork().
|
private |
Definition at line 208 of file FrameProcessing.h.
Referenced by hasPendingWork().
|
private |
Definition at line 205 of file FrameProcessing.h.
Referenced by hasPendingWork().
|
private |
Definition at line 201 of file FrameProcessing.h.
Referenced by hasPendingWork().
|
private |
Definition at line 191 of file FrameProcessing.h.
Referenced by setRenderingDataManager().
|
private |
Definition at line 190 of file FrameProcessing.h.
Referenced by ModelAssetPipeline().
|
private |
For async lightmap loading.
Definition at line 193 of file FrameProcessing.h.
Referenced by setTextureAssetPipeline().
|
private |
Definition at line 195 of file FrameProcessing.h.