7#include "Engine/Ecs/EcsData.h"
17 class ModelAssetManager;
25 class RenderingDataManager;
60 Assets::ModelAssetManager * modelAssetManager,
64 NamedThreadPool * assetLoaderPool,
83 void tick(
bool async =
true);
145 const std::shared_ptr<tinygltf::Model>& gltfModel,
146 const std::filesystem::path& modelPath);
Stores animation clips keyed by their source mesh path.
Loads glTF files and converts tinygltf data into engine asset data.
Asset manager for materials keyed by source file path and material name.
Stores mesh data with their primitives.
Stores skin and skeleton binding data keyed by source mesh path.
Asset manager for texture assets keyed by filesystem path.
Coordinates engine asset loading pipelines and runtime texture descriptor ownership.
Master asset import pipeline that dispatches asset submissions to the texture, model and audio sub-pi...
void submitAsset(const std::filesystem::path &asset)
Requests the load of a gltf file.
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)
Create a model asset loading pipeline.
void submitLoadModel(bool async=true)
void processKtx2Textures(bool async=true)
Assets::Loaders::GltfLoader * loader_
Assets::ModelAssetManager * modelAssetManager_
std::vector< std::future< CompletedMeshletGeneration > > meshletGenerationFutures_
NamedThreadPool * threadPool_
void tick(bool async=true)
Advances all stages of the model loading pipeline.
~ModelAssetPipeline()
Destroy the pipeline and its owned glTF loader resources.
AssetImportPipeline * assetImportPipeline_
For async lightmap loading.
Assets::MeshAssetManager * meshAssetManager_
std::vector< std::filesystem::path > assetQueue_
std::vector< GltfModelFuture > modelLoadingFutures_
bool hasPendingWork() const
Check if the pipeline still has in-flight work (loading, meshlet generation, etc.) Used to defer buff...
void processMaterial(bool async=true)
std::vector< MaterialLoadingData > materialResults_
std::vector< CompletedMeshletGeneration > pendingMeshletCompletions_
void processMeshData(bool async=true)
Assets::SkinAssetManager * skinAssetManager_
void processSkinData(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.
NamedThreadPool * assetLoaderPool_
Assets::TextureAssetManager * textureAssetManager_
std::vector< CompletedMeshletGeneration > takePendingMeshletCompletions()
Get and clear pending meshlet completions. Call this at a safe point to retrieve completed meshlet ge...
friend class AssetManager
Assets::AnimationAssetManager * animationAssetManager_
std::vector< Ktx2LoadFuture > pendingKtx2Futures_
std::vector< std::future< PrimitiveDataLoading > > primitiveDataFutures_
Assets::MaterialAssetManager * materialAssetManager_
void setRenderingDataManager(Core::RenderingDataManager *renderingDataManager)
Sets the RenderingDataManager to notify when meshes/materials are loaded.
void discardPendingWork()
Clears all queued and in-flight model loading work.
void setAssetImportPipeline(AssetImportPipeline *pipeline)
Sets the master AssetImportPipeline for async lightmap loading.
Core::AssetManager * assetManager_
For TextureHandleRegistry access.
void processModel(bool async=true)
Core::RenderingDataManager * renderingDataManager_
EnTT component data used by engine systems.