Diligent Engine
Loading...
Searching...
No Matches
Diligent::IRadientAssetManager Struct Referenceabstract

Creates asset references from authored or procedural data. More...

#include <RadientAssets.h>

Inheritance diagram for Diligent::IRadientAssetManager:
Diligent.IObject

Public Member Functions

virtual const RadientAssetManagerDesc &DILIGENT_CALL_TYPE GetDesc () const =0
 Returns the asset manager description.
virtual RADIENT_STATUS DILIGENT_CALL_TYPE CreateMesh (const RadientMeshCreateInfo &MeshCI, IRadientMeshAsset **ppMesh)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE CreateSkeleton (const RadientSkeletonDesc &SkeletonDesc, IRadientSkeletonAsset **ppSkeleton)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE CreateSkin (const RadientSkinDesc &SkinDesc, IRadientSkinAsset **ppSkin)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE CreateAnimationClip (const RadientAnimationClipDesc &ClipDesc, IRadientAnimationClipAsset **ppClip)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE CreateStandardMaterialDefinition (const RadientStandardMaterialDefinitionCreateInfo &DefinitionCI, IRadientMaterialDefinitionAsset **ppDefinition)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE CreateMaterial (IRadientMaterialDefinitionAsset *pDefinition, IRadientMaterialAsset **ppMaterial)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE LoadTexture (const RadientTextureLoadInfo &LoadInfo, IRadientTextureAsset **ppTexture)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE RegisterSceneAssetImporter (IRadientSceneAssetImporter *pImporter)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE LoadScene (const RadientSceneLoadInfo &LoadInfo, IRadientSceneAsset **ppScene)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE WaitForAssetLoad (IRadientAsset *pAsset)=0
virtual RADIENT_STATUS DILIGENT_CALL_TYPE Stop (IDeviceContext *pContext)=0
Public Member Functions inherited from Diligent.IObject
virtual void DILIGENT_CALL_TYPE QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0
 Queries the specific interface.
template<typename DerivedType, typename = typename std::enable_if<std::is_base_of<IObject, DerivedType>::value>::type>
void QueryInterface (const INTERFACE_ID &IID, DerivedType **ppInterface)
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE AddRef ()=0
 Increments the number of strong references by 1.
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE Release ()=0
virtual IReferenceCounters *DILIGENT_CALL_TYPE GetReferenceCounters () const =0

Detailed Description

Creates asset references from authored or procedural data.

Member Function Documentation

◆ CreateAnimationClip()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientAssetManager::CreateAnimationClip ( const RadientAnimationClipDesc & ClipDesc,
IRadientAnimationClipAsset ** ppClip )
pure virtual

Creates an immutable, unbound animation clip.

The manager validates structural and native-storage invariants and copies the name, descriptor tables, target names, keyframe times, and value bytes before returning. It does not resolve target schemas or validate property-specific value compatibility; those checks occur when the clip is bound to a runtime instance.

Parameters
[in]ClipDesc- Clip description to validate and copy. Its data only needs to remain valid for this call.
[out]ppClip- Address of a null pointer that receives a strong reference on success. It remains null on failure.
Returns
RADIENT_STATUS_OK on success, RADIENT_STATUS_INVALID_ARGUMENT for a malformed description or output pointer, RADIENT_STATUS_INVALID_OPERATION after Stop(), or RADIENT_STATUS_FAILED if storage creation fails.

◆ CreateMaterial()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientAssetManager::CreateMaterial ( IRadientMaterialDefinitionAsset * pDefinition,
IRadientMaterialAsset ** ppMaterial )
pure virtual

Creates a mutable material asset initialized with Definition's default parameter values. Definition must be a compatible Radient material definition asset. On success, ppMaterial receives a strong reference.

◆ CreateMesh()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientAssetManager::CreateMesh ( const RadientMeshCreateInfo & MeshCI,
IRadientMeshAsset ** ppMesh )
pure virtual

Creates a mesh asset from CPU-side primitive data.

The returned status reports asset payload creation and source-data processing. A successful status does not guarantee that all GPU upload work has completed.

◆ CreateSkeleton()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientAssetManager::CreateSkeleton ( const RadientSkeletonDesc & SkeletonDesc,
IRadientSkeletonAsset ** ppSkeleton )
pure virtual

Creates an immutable skeleton hierarchy asset. The description and all joint names and transforms are copied before this method returns. On success, ppSkeleton receives a strong reference.

◆ CreateSkin()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientAssetManager::CreateSkin ( const RadientSkinDesc & SkinDesc,
IRadientSkinAsset ** ppSkin )
pure virtual

Creates an immutable skin asset that maps a mesh's joint palette to a skeleton. The skin retains the skeleton and copies all joint mappings and inverse-bind matrices. On success, ppSkin receives a strong reference.

◆ CreateStandardMaterialDefinition()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientAssetManager::CreateStandardMaterialDefinition ( const RadientStandardMaterialDefinitionCreateInfo & DefinitionCI,
IRadientMaterialDefinitionAsset ** ppDefinition )
pure virtual

Creates or retrieves a cached built-in standard material definition asset. Compatible descriptions may return the same immutable asset. On success, ppDefinition receives a strong reference.

◆ LoadScene()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientAssetManager::LoadScene ( const RadientSceneLoadInfo & LoadInfo,
IRadientSceneAsset ** ppScene )
pure virtual

Starts loading an authored scene asset from a URI.

The returned status reports scene loading and GPU upload scheduling. A successful status does not guarantee that all GPU resources referenced by the scene are ready. Returns RADIENT_STATUS_PENDING when loading continues asynchronously.

◆ LoadTexture()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientAssetManager::LoadTexture ( const RadientTextureLoadInfo & LoadInfo,
IRadientTextureAsset ** ppTexture )
pure virtual

Starts loading a texture asset from a URI or texture data.

The returned status reports source loading and GPU upload scheduling. A successful status does not guarantee that the texture is already available for sampling. Returns RADIENT_STATUS_PENDING when loading continues asynchronously. Encoded input in LoadInfo.pDataBlob or decoded input in LoadInfo.pTextureData->pDataBlob is retained with read access until the source bytes are no longer needed. An active writer prevents loading and returns RADIENT_STATUS_INVALID_OPERATION. The caller may release its blob reference after the call. Rejected loads leave ownership with the caller.

◆ RegisterSceneAssetImporter()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientAssetManager::RegisterSceneAssetImporter ( IRadientSceneAssetImporter * pImporter)
pure virtual

Registers a scene-format importer and retains it for this manager's lifetime.

The importer provides a nonempty, immutable, case-sensitive identifier whose string remains valid for the importer's lifetime. The manager retains the importer and copies its identifier. Built-in importers are registered first as "gltf" and "obj", in that order. Automatic selection checks importers in registration order and uses the first match, logging an informational message when more than one matches. Set RadientSceneLoadInfo::ImporterId to select a particular importer explicitly.

This method is thread-safe and may be called concurrently with LoadScene(). Registering an importer does not change importer selection already in progress. Importers remain registered for the manager's lifetime; unregistration and replacement are not supported.

Returns RADIENT_STATUS_OK on success, RADIENT_STATUS_INVALID_ARGUMENT for a null importer, null/empty identifier, or duplicate identifier, RADIENT_STATUS_INVALID_OPERATION after Stop(), and RADIENT_STATUS_FAILED if registration fails, including when an importer callback throws.

Importer implementations use the C++ interface in RadientSceneAssetImporter.hpp. This header only forward-declares the importer, keeping the manager C-compatible.

◆ Stop()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientAssetManager::Stop ( IDeviceContext * pContext)
pure virtual

Permanently stops the asset manager's internal GPU upload work.

The method must be called before destroying a GPU-backed asset manager. pContext must be the device context used by the renderer/update path and must not be used concurrently while Stop() is executing.

◆ WaitForAssetLoad()

virtual RADIENT_STATUS DILIGENT_CALL_TYPE Diligent::IRadientAssetManager::WaitForAssetLoad ( IRadientAsset * pAsset)
pure virtual

Blocks the calling thread until asset payload loading and GPU upload scheduling have completed.

This does not wait for the render thread to execute queued GPU upload callbacks. Resource-specific accessors may still report that GPU resources are not ready after this method returns RADIENT_STATUS_OK. This is intended for tests and explicit synchronization points only; normal rendering/import code should avoid it.