Class DrawContextMaterialResources
This class manage all resources associated to a material.
Implements
Inherited Members
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public class DrawContextMaterialResources : DisposableObject, IDisposable
Constructors
DrawContextMaterialResources(DrawContextEffectResources, BaseMaterial)
Initializes a new instance of the DrawContextMaterialResources class.
Declaration
public DrawContextMaterialResources(DrawContextEffectResources effectResources, BaseMaterial material)
Parameters
Type | Name | Description |
---|---|---|
DrawContextEffectResources | effectResources | The effect resources. |
BaseMaterial | material | The material. |
Fields
EffectResources
The parent effect resources.
Declaration
public readonly DrawContextEffectResources EffectResources
Field Value
Type | Description |
---|---|
DrawContextEffectResources |
Material
The material.
Declaration
public readonly BaseMaterial Material
Field Value
Type | Description |
---|---|
BaseMaterial |
MaterialCBuffers
The constant buffers of this material.
Declaration
public readonly ConstantBuffer[] MaterialCBuffers
Field Value
Type | Description |
---|---|
ConstantBuffer[] |
ResourceSets
The resource set collection of each material pass resources.
Declaration
public readonly Dictionary<MaterialPassResources, MaterialPassResourceSet> ResourceSets
Field Value
Type | Description |
---|---|
Dictionary<MaterialPassResources, MaterialPassResourceSet> |
Properties
ReferenceCount
Gets the number of references pointing to this effect entry.
Declaration
public uint ReferenceCount { get; }
Property Value
Type | Description |
---|---|
uint |
Methods
AddReference()
Increase a reference to this effect entry.
Declaration
public void AddReference()
Destroy()
Destroy all resources of this instance.
Declaration
protected override void Destroy()
Overrides
Prepare(CommandBuffer)
Prepare all resources of this effect.
Declaration
public void Prepare(CommandBuffer commandBuffer)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | commandBuffer | The command buffer. |
RegisterMaterialPass(MaterialPassResources)
Register the material pass resource.
Declaration
public MaterialPassResourceSet RegisterMaterialPass(MaterialPassResources passResources)
Parameters
Type | Name | Description |
---|---|---|
MaterialPassResources | passResources | The material pass resources. |
Returns
Type | Description |
---|---|
MaterialPassResourceSet | The resourceset associated to this passResource. |
RemoveReference()
Remove a refernece of this effect entry.
Declaration
public void RemoveReference()
UnregisterMaterialPass(MaterialPassResources)
Unregister the material pass resource.
Declaration
public void UnregisterMaterialPass(MaterialPassResources passResources)
Parameters
Type | Name | Description |
---|---|---|
MaterialPassResources | passResources | The material pass resources. |