Class ConstantBufferPool
- Namespace
- HelixToolkit.SharpDX.ShaderManager
- Assembly
- HelixToolkit.SharpDX.dll
Pool to store and share constant buffers. Do not dispose constant buffer object externally.
public sealed class ConstantBufferPool : ReferenceCountedDictionaryPool<string, ConstantBufferProxy, ConstantBufferDescription>, IConstantBufferPool, IDisposable
- Inheritance
-
ConstantBufferPool
- Implements
- Inherited Members
Constructors
ConstantBufferPool(Device)
Initializes a new instance of the ConstantBufferPool class.
public ConstantBufferPool(Device device)
Parameters
deviceDeviceThe device.
Properties
Device
Gets the device.
public Device Device { get; }
Property Value
- Device
The device.
Methods
CanCreate(ref string, ref ConstantBufferDescription)
protected override bool CanCreate(ref string key, ref ConstantBufferDescription argument)
Parameters
keystringargumentConstantBufferDescription
Returns
OnCreate(ref string, ref ConstantBufferDescription)
Creates the specified constant buffer.
protected override ConstantBufferProxy OnCreate(ref string key, ref ConstantBufferDescription description)
Parameters
keystringThe key.
descriptionConstantBufferDescriptionThe description.
Returns
Register(ConstantBufferDescription)
Registers the specified description.
public ConstantBufferProxy? Register(ConstantBufferDescription description)
Parameters
descriptionConstantBufferDescriptionThe description.
Returns
Register(string, int)
Registers the specified name.
public ConstantBufferProxy? Register(string name, int structSize)