|
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::SkinAssetManager *skinAssetManager, Assets::AnimationAssetManager *animationAssetManager, 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 > &gltfModel, 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 107 of file FrameProcessing.h.
|
explicit |
| 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 156 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 |
| gltfModel | Model to extract the textures from |
| 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 135 of file FrameProcessing.h.
References renderingDataManager_.
|
inline |
Sets the TextureAssetPipeline for async lightmap loading.
| pipeline | Pointer to the TextureAssetPipeline |
Definition at line 141 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 195 of file FrameProcessing.h.
|
private |
Definition at line 216 of file FrameProcessing.h.
|
private |
For TextureHandleRegistry access.
Definition at line 198 of file FrameProcessing.h.
|
private |
Definition at line 204 of file FrameProcessing.h.
Referenced by hasPendingWork().
|
private |
Definition at line 202 of file FrameProcessing.h.
|
private |
Definition at line 192 of file FrameProcessing.h.
|
private |
Definition at line 206 of file FrameProcessing.h.
Referenced by hasPendingWork().
|
private |
Definition at line 191 of file FrameProcessing.h.
|
private |
Definition at line 208 of file FrameProcessing.h.
Referenced by hasPendingWork().
|
private |
Definition at line 193 of file FrameProcessing.h.
|
private |
Definition at line 205 of file FrameProcessing.h.
Referenced by hasPendingWork().
|
private |
Definition at line 214 of file FrameProcessing.h.
Referenced by hasPendingWork().
|
private |
Definition at line 211 of file FrameProcessing.h.
Referenced by hasPendingWork().
|
private |
Definition at line 207 of file FrameProcessing.h.
Referenced by hasPendingWork().
|
private |
Definition at line 197 of file FrameProcessing.h.
Referenced by setRenderingDataManager().
|
private |
Definition at line 194 of file FrameProcessing.h.
|
private |
Definition at line 196 of file FrameProcessing.h.
|
private |
For async lightmap loading.
Definition at line 199 of file FrameProcessing.h.
Referenced by setTextureAssetPipeline().
|
private |
Definition at line 201 of file FrameProcessing.h.