Class BaseMaterialDecorator
Base Material Decorator class. (Decorates Material and ComputeTask classes).
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public abstract class BaseMaterialDecorator
Constructors
BaseMaterialDecorator(BaseMaterial)
Initializes a new instance of the BaseMaterialDecorator class.
Declaration
public BaseMaterialDecorator(BaseMaterial material)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseMaterial | material | Base material. |
Fields
material
The material.
Declaration
protected BaseMaterial material
Field Value
| Type | Description |
|---|---|
| BaseMaterial |
Properties
ActiveDirectivesNames
Gets or sets the active directives.
Declaration
public string[] ActiveDirectivesNames { get; set; }
Property Value
| Type | Description |
|---|---|
| string[] |
Effect
Gets the effect.
Declaration
public Effect Effect { get; }
Property Value
| Type | Description |
|---|---|
| Effect |
Methods
Dispose()
Frees material resources.
Declaration
public void Dispose()
GetMaterialPassResources(string, bool)
Gets the material resources associated with the specified pass name. If the specified passName does not exist in the material effect, return null. (Optional) If required, add a more restrictive condition; it indicates whether the pass exists and if it is necessary.
Declaration
public MaterialPassResources GetMaterialPassResources(string passName, bool required = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | passName | Pass name. |
| bool | required | Indicates if the pass exists and is required with the current active directives or only if the pass exists. |
Returns
| Type | Description |
|---|---|
| MaterialPassResources | The material pass resources, or null if the passName doesn't exist. |
Prepare(CommandBuffer)
Sets the engine shader parameters in the constant buffers of the material.
Declaration
public void Prepare(CommandBuffer commandBuffer)
Parameters
| Type | Name | Description |
|---|---|---|
| CommandBuffer | commandBuffer | The command buffer. |