Interface IMaterial
Defines the contract for a material used in rendering operations, including identification, configuration, and lifecycle management.
public interface IMaterial : IGraphicsResource, IIdentifier, ISerialization
- Inherited Members
Remarks
Implementations of this interface represent materials that can be initialized, used, and disposed of with a rendering device. The interface also provides a static method for loading a material from an external source. Implementers should ensure thread safety if materials are accessed concurrently.
Properties
IsTransparent
bool IsTransparent { get; }
Property Value
Methods
Disable(IRenderDevice)
Disables the Material after rendering operations are complete.
void Disable(IRenderDevice renderDevice)
Parameters
renderDeviceIRenderDevice
LoadMaterial(Material, string)
Creates an IMaterial instance from the specified Assimp material and associated resource directory.
void LoadMaterial(Material asmat, string directory)
Parameters
asmatMaterialThe Assimp.Material object containing material properties to be loaded.
directorystringThe directory path used to resolve any external resources referenced by the material. Cannot be null or empty.
Remarks
Use this method to convert materials imported via Assimp into the application's material representation. The directory parameter should point to the location of any textures or external resources referenced by the material.
Use(IRenderDevice)
Configures the current instance to use the specified render device for rendering operations.
void Use(IRenderDevice renderDevice)
Parameters
renderDeviceIRenderDeviceThe render device to be used. Cannot be null.