Class ConstantBufferComponent
- Namespace
- HelixToolkit.SharpDX.Core.Components
- Assembly
- HelixToolkit.SharpDX.dll
public sealed class ConstantBufferComponent : CoreComponent, IDisposable
- Inheritance
-
ConstantBufferComponent
- Implements
- Inherited Members
Constructors
ConstantBufferComponent(ConstantBufferDescription)
Initializes a new instance of the ConstantBufferComponent class.
public ConstantBufferComponent(ConstantBufferDescription desc)
Parameters
descConstantBufferDescriptionThe desc.
ConstantBufferComponent(string, int)
Initializes a new instance of the ConstantBufferComponent class.
public ConstantBufferComponent(string name, int structSize)
Parameters
Properties
ModelConstBuffer
Gets or sets the model constant buffer.
public ConstantBufferProxy? ModelConstBuffer { get; }
Property Value
- ConstantBufferProxy
The model constant buffer.
Methods
OnAttach(IRenderTechnique?)
protected override void OnAttach(IRenderTechnique? technique)
Parameters
techniqueIRenderTechnique
OnDetach()
protected override void OnDetach()
ReadValueByName<T>(string, out T)
public bool ReadValueByName<T>(string name, out T value) where T : unmanaged
Parameters
namestringvalueT
Returns
Type Parameters
T
ReadValue<T>(int, out T)
public bool ReadValue<T>(int offset, out T value) where T : unmanaged
Parameters
offsetintvalueT
Returns
Type Parameters
T
Upload(DeviceContextProxy)
Uploads the specified device context. This uploads internal byte buffer only.
public bool Upload(DeviceContextProxy deviceContext)
Parameters
deviceContextDeviceContextProxyThe device context.
Returns
Upload<T>(DeviceContextProxy, ref T)
Uploads the specified device context. This function writes a external struct and writes remains byte buffer by offset = input struct size/>
public bool Upload<T>(DeviceContextProxy deviceContext, ref T data) where T : unmanaged
Parameters
deviceContextDeviceContextProxyThe device context.
dataTThe data.
Returns
Type Parameters
T
WriteValueByName<T>(string, T)
Writes the value into internal byte buffer
public void WriteValueByName<T>(string name, T value) where T : unmanaged
Parameters
namestringThe variable name.
valueTThe value.
Type Parameters
T
WriteValue<T>(T, int)
Writes the value into internal byte buffer
public void WriteValue<T>(T value, int offset) where T : unmanaged
Parameters
valueTThe value.
offsetintThe offset.
Type Parameters
T