A request to either load or unload a texture/mesh/material.
Any assets associated with an AssetJob have already been downloaded or read from disk, but may remain in compressed or in an otherwise not immediately usable form. As such, any assets should ideally be fetched to application controlled memory outside any render thread before being used in any performance-sensitive thread.
- auto getJobType() const -> JobType pure virtual
- Distinguishes between load and unload tasks.
- auto getAssetType() const -> AssetType pure virtual
- Type of asset to process.
- auto getMaterialData() -> const MaterialData* pure virtual
- Get MaterialData if getAssetType is Material.
- auto getMeshLoader() -> MeshLoader* pure virtual
- Get MeshLoader if getAssetType is Mesh.
- auto getTextureData() -> const TextureData* pure virtual
- Get TextureData if getAssetType is Texture.
- auto getUserPointer() -> UserPointer pure virtual
- Gets the user pointer if getJobType() == StreamOut.
- void finish(JobResult status, UserPointer userPointer) pure virtual
- Inform Runtime of AssetJob completion.
- auto abortRequested() const -> bool pure virtual
- Query if this job should be aborted.
AssetJob:: finish(JobResult status,
UserPointer userPointer) pure virtual
|status||Success/failure of AssetJob. A job can be failed safely for transient reasons, failed jobs will be retried in a later frame if the asset remains relevant. Umbra does not directly limit memory use if OutOfMemory is used. Instead, the quality requested from any View should be reduced to limit asset memory use.|
|userPointer||User-defined identifier for the asset resulting from this job. Umbra will use this later to refer to the asset. userPointer is ignored for StreamOut jobs.|
While many AssetJobs can be active at any one time, finish should be called as soon as possible to let Umbra use assets or start jobs loading dependent assets.