Class DrawContextMaterialResources
This class manages all resources associated with a material.
Inherited Members
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public class DrawContextMaterialResources : DisposableObject
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's 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 for this material.
Declaration
public readonly ConstantBuffer[] MaterialCBuffers
Field Value
Type | Description |
---|---|
ConstantBuffer[] |
ResourceSets
The collection of resource sets for each material pass.
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()
Increases a reference to this effect entry.
Declaration
public void AddReference()
Destroy()
Destroys all resources of this instance.
Declaration
protected override void Destroy()
Overrides
Prepare(CommandBuffer)
Prepares all resources for this effect.
Declaration
public void Prepare(CommandBuffer commandBuffer)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | commandBuffer | The command buffer. |
RegisterMaterialPass(MaterialPassResources)
Registers 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 with this pass resource. |
RemoveReference()
Removes a reference of this effect entry.
Declaration
public void RemoveReference()
UnregisterMaterialPass(MaterialPassResources)
Unregisters the material pass resource.
Declaration
public void UnregisterMaterialPass(MaterialPassResources passResources)
Parameters
Type | Name | Description |
---|---|---|
MaterialPassResources | passResources | The material pass resources. |