Class CBufferCollectionUpdater
This is a collection of CBuffers associated by effects that is going to be updated.
Implements
Inherited Members
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public class CBufferCollectionUpdater : DisposableObject, IDisposable
Constructors
CBufferCollectionUpdater(UpdatePolicy, int)
Initializes a new instance of the CBufferCollectionUpdater class.
Declaration
public CBufferCollectionUpdater(UpdatePolicy updatePolicy, int sizeBlockMultiplier = 1)
Parameters
Type | Name | Description |
---|---|---|
UpdatePolicy | updatePolicy | The update policy. |
int | sizeBlockMultiplier | Multiply the size of a cbuffer. |
Fields
UpdatePolicy
The update policy of this cBuffer collection.
Declaration
public readonly UpdatePolicy UpdatePolicy
Field Value
Type | Description |
---|---|
UpdatePolicy |
Methods
Collect(IEngineShaderParameters)
Update the constant buffers.
Declaration
public void Collect(IEngineShaderParameters engineShaderParameters)
Parameters
Type | Name | Description |
---|---|---|
IEngineShaderParameters | engineShaderParameters | The engine shader parameters. |
Destroy()
Destroy all resources of this instance.
Declaration
protected override void Destroy()
Overrides
GetCBufferUpdater(Effect)
Gets a cbuffer effect updater of the specified effect.
Declaration
public CBufferCollectionUpdaterEffectEntry GetCBufferUpdater(Effect effect)
Parameters
Type | Name | Description |
---|---|---|
Effect | effect | The effect. |
Returns
Type | Description |
---|---|
CBufferCollectionUpdaterEffectEntry | The cbuffer updater. |
GetConstantBuffer(Effect, int)
Gets a cbuffer of the specified slot and effect.
Declaration
public ConstantBuffer GetConstantBuffer(Effect effect, int slot)
Parameters
Type | Name | Description |
---|---|---|
Effect | effect | The effect. |
int | slot | The cbuffer slot. |
Returns
Type | Description |
---|---|
ConstantBuffer | The constant buffer. |
Prepare(CommandBuffer)
Prepare all registered effects.
Declaration
public void Prepare(CommandBuffer commandBuffer)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | commandBuffer | The command buffer. |
RegisterEffect(Effect)
Register an effect.
Declaration
public CBufferCollectionUpdaterEffectEntry RegisterEffect(Effect effect)
Parameters
Type | Name | Description |
---|---|---|
Effect | effect | The effect to register. |
Returns
Type | Description |
---|---|
CBufferCollectionUpdaterEffectEntry | The updater entry associated to this effect. |
UnregisterEffect(Effect)
Unregister an effect.
Declaration
public void UnregisterEffect(Effect effect)
Parameters
Type | Name | Description |
---|---|---|
Effect | effect | The effect to unregister. |