#include <RadientMaterials.h>
Public Member Functions | |
| virtual IRadientMaterialDefinitionAsset *DILIGENT_CALL_TYPE | GetDefinition () const =0 |
| Returns a borrowed pointer to the definition retained by this asset. | |
| virtual Uint64 DILIGENT_CALL_TYPE | GetVersion () const =0 |
| virtual RADIENT_STATUS DILIGENT_CALL_TYPE | GetParameter (RadientMaterialParameterHandle Handle, void *pData, Uint32 DataSize) const =0 |
| virtual RADIENT_STATUS DILIGENT_CALL_TYPE | GetTexture (RadientMaterialParameterHandle Handle, Uint32 ArrayIndex, IRadientTextureAsset **ppTexture) const =0 |
| virtual RADIENT_STATUS DILIGENT_CALL_TYPE | CreateWriter (IRadientMaterialWriter **ppWriter)=0 |
| Public Member Functions inherited from Diligent::IRadientAsset | |
| virtual const RadientAssetReference &DILIGENT_CALL_TYPE | GetReference () const =0 |
| Returns the asset reference identity. | |
| virtual RADIENT_ASSET_TYPE DILIGENT_CALL_TYPE | GetType () const =0 |
| Returns the concrete asset type. | |
| 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 |
Definition-backed material asset with editable parameters and surface state.
Writers may initialize all properties before the asset's load status, GPU resource status, or render view is first queried. After that, non-texture parameters, surface mode, alpha cutoff, and double-sided state remain editable. Changing textures returns RADIENT_STATUS_INVALID_OPERATION from Commit() without applying any of that commit's assignments.
Runtime edits are performed on the render thread before rendering a frame. Successful commits immediately update values returned by the asset and its version. Rendering uses the changes during the next frame preparation, without restarting material loading. Multiple commits before preparation use the latest values. Material assets and their writers do not support concurrent client access; the caller serializes its reads and writes. Internal asynchronous material preparation is coordinated with these edits. Surface-mode and double-sided changes may require new renderer pipelines. With asynchronous pipeline compilation, affected geometry is skipped until its pipelines are ready.
Radient-created material assets expose IRadientAnimationDestination through QueryInterface(). RadientMaterialAnimationSchemaID addresses non-texture parameters by their reflected names, including custom parameters and array ranges. RadientSurfaceMaterialAnimationSchemaID exposes surface alpha cutoff. Both schemas use destination element zero. These animation declarations are provided by RadientAnimation.h. Animation edits the shared asset and follows the runtime update requirements above.
|
pure virtual |
Creates a reusable writer with no pending changes. On success, ppWriter receives a strong reference to the writer.
|
pure virtual |
Copies the complete scalar, vector, matrix, or value array identified by Handle to pData. DataSize must exactly match the parameter's native data size. Texture parameters are not accepted.
|
pure virtual |
|
pure virtual |
Returns a monotonically increasing version of the complete material state. The version changes after every commit that modifies at least one parameter or specialized material property such as surface mode.