Class DrawContextEffectResources
This class manages all resources associated with an effect.
Inherited Members
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public class DrawContextEffectResources : DisposableObject
Constructors
DrawContextEffectResources(DrawContextResources, Effect)
Initializes a new instance of the DrawContextEffectResources class.
Declaration
public DrawContextEffectResources(DrawContextResources drawContextResources, Effect effect)
Parameters
Type | Name | Description |
---|---|---|
DrawContextResources | drawContextResources | The draw context resources. |
Effect | effect | The effect. |
Fields
DrawContextResources
The drawing resources.
Declaration
public readonly DrawContextResources DrawContextResources
Field Value
Type | Description |
---|---|
DrawContextResources |
DynamicConstantBuffers
The constant buffers by slot.
Declaration
public ConstantBuffer[] DynamicConstantBuffers
Field Value
Type | Description |
---|---|
ConstantBuffer[] |
Effect
The effect associated with this instance.
Declaration
public readonly Effect Effect
Field Value
Type | Description |
---|---|
Effect |
MaterialResources
Draws the material collection.
Declaration
public Dictionary<BaseMaterial, DrawContextMaterialResources> MaterialResources
Field Value
Type | Description |
---|---|
Dictionary<BaseMaterial, DrawContextMaterialResources> |
PerDrawCallBuffers
Per draw call CBuffer collection.
Declaration
public readonly CBufferCollectionUpdaterEffectEntry PerDrawCallBuffers
Field Value
Type | Description |
---|---|
CBufferCollectionUpdaterEffectEntry |
PerSceneBuffers
Per-scene CBuffer collection.
Declaration
public readonly CBufferCollectionUpdaterEffectEntry PerSceneBuffers
Field Value
Type | Description |
---|---|
CBufferCollectionUpdaterEffectEntry |
PerViewBuffers
Per-view CBuffer collection.
Declaration
public readonly CBufferCollectionUpdaterEffectEntry PerViewBuffers
Field Value
Type | Description |
---|---|
CBufferCollectionUpdaterEffectEntry |
TextureSlots
The array of texture slots.
Declaration
public TextureSlot[] TextureSlots
Field Value
Type | Description |
---|---|
TextureSlot[] |
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()
CollectDrawCall(IEngineShaderParameters, ref uint[])
Updates the constant buffers.
Declaration
public void CollectDrawCall(IEngineShaderParameters effectParams, ref uint[] dynamicCBufferOffsets)
Parameters
Type | Name | Description |
---|---|---|
IEngineShaderParameters | effectParams | The engine shader parameters. |
uint[] | dynamicCBufferOffsets | The dynamic buffer offsets array. |
CollectView(IEngineShaderParameters)
Updates the constant buffers.
Declaration
public void CollectView(IEngineShaderParameters effectParams)
Parameters
Type | Name | Description |
---|---|---|
IEngineShaderParameters | effectParams | The engine's shader parameters. |
Destroy()
Destroys all resources of this instance.
Declaration
protected override void Destroy()
Overrides
GetConstantBuffer(int, UpdatePolicy)
Gets effect constant buffer by slot and update policy.
Declaration
public ConstantBuffer GetConstantBuffer(int slot, UpdatePolicy updatePolicy)
Parameters
Type | Name | Description |
---|---|---|
int | slot | The buffer slot. |
UpdatePolicy | updatePolicy | The update policy. |
Returns
Type | Description |
---|---|
ConstantBuffer | The constant buffer. |
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 resource set associated with this pass resource. |
RemoveReference()
Removes a reference of this effect entry.
Declaration
public void RemoveReference()
Events
TexturesChanged
Event fired when a texture has been changed.
Declaration
public event EventHandler TexturesChanged
Event Type
Type | Description |
---|---|
EventHandler |