19 class ModelAssetManager;
33 class RenderingDataManager;
59 void tick(
bool async =
true);
184 const std::shared_ptr<tinygltf::Model>& model,
185 const std::filesystem::path& modelPath);
Manages audio assets by filesystem path, providing dedup and lookup.
Holds decoded PCM audio data as an engine asset.
Stores mesh data with their primitives.
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.
Assets::MeshAssetManager * meshAssetManager
void submitLoadModel(bool async=true)
std::vector< std::future< CompletedMeshletGeneration > > meshletGenerationFutures
void processKtx2Textures(bool async=true)
std::vector< std::future< PrimitiveDataLoading > > primitiveDataFutures
NamedThreadPool * threadPool_
void tick(bool async=true)
Assets::Loaders::GltfLoader * loader
void setTextureAssetPipeline(TextureAssetPipeline *pipeline)
Sets the TextureAssetPipeline for async lightmap loading.
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)
void processSkinData(bool async=true)
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::TextureAssetManager * textureAssetManager
TextureAssetPipeline * textureAssetPipeline_
For async lightmap loading.
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.
std::vector< Ktx2LoadFuture > pendingKtx2Futures_
Assets::ModelAssetManager * modelAssetManager
ModelAssetPipeline(Assets::MeshAssetManager *meshAssetManager, Assets::MaterialAssetManager *materialAssetManager, Assets::ModelAssetManager *modelAssetManager, Assets::TextureAssetManager *textureAssetManager, NamedThreadPool *assetLoaderPool, Core::AssetManager *assetManager=nullptr)
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)
NamedThreadPool * assetLoaderPool
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< std::filesystem::path, Audio > AudioAssetRef
constexpr size_t MAX_AUDIO_LOADS_PER_FRAME
Maximum audio assets to finalize per frame in the pipeline.
Core audio subsystem owning the miniaudio engine and managing playback.
Assets::AudioAssetRef ref
std::filesystem::path path
std::future< Assets::AudioData > future