19 class ModelAssetManager;
34 class RenderingDataManager;
60 void tick(
bool async =
true);
115 Assets::ModelAssetManager * modelAssetManager,
188 const std::shared_ptr<tinygltf::Model>& gltfModel,
189 const std::filesystem::path& modelPath);
Manages audio assets by filesystem path, providing dedup and lookup.
Holds decoded PCM audio data as an engine asset.
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.
Asset manager for texture assets keyed by filesystem path.
Wrapper for texture data.
Owns the miniaudio engine and provides the playback API.
void setAudioEngine(Core::AudioEngine *engine)
Set the AudioEngine to notify when assets finish loading.
std::vector< AudioLoadFuture > loadFutures_
void retrieveDecodedAudio()
Core::AudioEngine * audioEngine_
void tick(bool async=true)
Advances the pipeline state machine (call once per frame)
size_t getPendingCount() const
Returns the number of audio assets still pending.
void submitAsset(const std::filesystem::path &asset)
Submit an audio file for async loading.
void discardPendingWork()
AudioAssetPipeline(Assets::AudioAssetManager *audioAssetManager, NamedThreadPool *assetLoaderPool)
std::vector< std::filesystem::path > assetQueue_
friend class AssetManager
Assets::AudioAssetManager * audioAssetManager_
NamedThreadPool * assetLoaderPool_
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)
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)
void setTextureAssetPipeline(TextureAssetPipeline *pipeline)
Sets the TextureAssetPipeline 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
TextureAssetPipeline * textureAssetPipeline_
For async lightmap loading.
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()
Core::AssetManager * assetManager_
For TextureHandleRegistry access.
void processModel(bool async=true)
Core::RenderingDataManager * renderingDataManager_
Infrastructure to load images into the ecs.
std::vector< std::filesystem::path > ktx2Queue_
std::vector< ExrHeaderFuture > exrHeaderFutures_
size_t getPendingCount() const
Returns the number of textures still pending in the pipeline.
std::vector< Ktx2LoadFuture > ktx2LoadFutures_
NamedThreadPool * assetLoaderPool_
TextureAssetPipeline(Assets::TextureAssetManager *textureAssetManager, NamedThreadPool *assetLoaderPool)
Core::RenderingDataManager * renderingDataManager_
void setRenderingDataManager(Engine::Core::RenderingDataManager *renderingDataManager)
Sets the RenderingDataManager to notify when textures are loaded.
std::vector< std::filesystem::path > assetQueue_
void processKtx2Textures(bool async=true)
void retrieveImageData(bool async=true)
size_t maxTexturesPerFrame_
Rate limit for texture processing per frame.
std::vector< AssetLoadingImage > imageFutures_
Assets::TextureAssetManager * textureAssetManager_
void discardPendingWork()
void tick(bool async=true)
Advances the state machine for the entire pipeline.
void loadImageData(bool async=true)
void submitAsset(const std::filesystem::path &asset)
submit the path to an asset relative from the executable to load
void requestExrHeaders(bool async=true)
void setMaxTexturesPerFrame(size_t max)
Sets the maximum number of textures to process per frame.
Tracy-named thread pool using BS_tracy::tracy_thread_pool.
Asset::Ref< Asset::Path, Audio > AudioAssetRef
constexpr size_t MAX_AUDIO_LOADS_PER_FRAME
Maximum audio assets to finalize per frame in the pipeline.
Manages IBL (Image-Based Lighting) resources for specular reflections.
Assets::AudioAssetRef ref
std::filesystem::path path
std::future< Assets::AudioData > future