Class LightsBufferModel
- Namespace
- HelixToolkit.SharpDX.Model
- Assembly
- HelixToolkit.SharpDX.dll
Default Light Model
public sealed class LightsBufferModel : ILightsBufferProxy<LightStruct>
- Inheritance
-
LightsBufferModel
- Implements
- Inherited Members
Fields
SizeInBytes
public const int SizeInBytes = 1824
Field Value
Properties
AmbientLight
Gets or sets the ambient light.
public Color4 AmbientLight { get; set; }
Property Value
- Color4
The ambient light.
BufferSize
Gets the size of the buffer.
public int BufferSize { get; }
Property Value
- int
The size of the buffer.
LightCount
Gets the light count.
public int LightCount { get; }
Property Value
- int
The light count.
Lights
Gets the light array
public LightStruct[] Lights { get; }
Property Value
- LightStruct[]
The lights.
Methods
IncrementLightCount()
Increments the light count. Increment during each light render (except Ambient light).
public void IncrementLightCount()
ResetLightCount()
Resets the light count. Must call before calling light render
public void ResetLightCount()
UploadToBuffer(IBufferProxy?, DeviceContextProxy?)
Upload light models to constant buffer.
public void UploadToBuffer(IBufferProxy? buffer, DeviceContextProxy? context)
Parameters
bufferIBufferProxyThe buffer.
contextDeviceContextProxyThe context.