Class Sprite2DBufferModel
- Namespace
- HelixToolkit.SharpDX.Core
- Assembly
- HelixToolkit.SharpDX.dll
public sealed class Sprite2DBufferModel : DisposeObject, IAttachableBufferModel, IGUID, IDisposable
- Inheritance
-
Sprite2DBufferModel
- Implements
- Inherited Members
Constructors
Sprite2DBufferModel()
public Sprite2DBufferModel()
Fields
SpriteCount
public int SpriteCount
Field Value
Properties
GUID
Gets the unique identifier.
public Guid GUID { get; }
Property Value
- Guid
The unique identifier.
IndexBuffer
Gets the index buffer.
public IElementsBufferProxy? IndexBuffer { get; }
Property Value
- IElementsBufferProxy
The index buffer.
IndexCount
public int IndexCount { get; set; }
Property Value
Indices
public int[]? Indices { get; set; }
Property Value
- int[]
Sprites
public SpriteStruct[]? Sprites { get; set; }
Property Value
Topology
Gets or sets the topology.
public PrimitiveTopology Topology { get; set; }
Property Value
- PrimitiveTopology
The topology.
VertexBuffer
Gets the vertex buffer.
public IElementsBufferProxy?[] VertexBuffer { get; }
Property Value
- IElementsBufferProxy[]
The vertex buffer.
VertexStructSize
Gets the size of the vertex structure.
public IEnumerable<int> VertexStructSize { get; }
Property Value
- IEnumerable<int>
The size of the vertex structure.
Methods
AttachBuffers(DeviceContextProxy, ref int, IDeviceResources?)
Attaches the buffers.
public bool AttachBuffers(DeviceContextProxy context, ref int vertexBufferStartSlot, IDeviceResources? deviceResources)
Parameters
contextDeviceContextProxyThe context.
vertexBufferStartSlotintThe vertex buffer slot. It will be changed to next available slot after binding.
deviceResourcesIDeviceResources
Returns
OnDispose(bool)
Disposes of object resources.
protected override void OnDispose(bool disposeManagedResources)
Parameters
disposeManagedResourcesboolIf true, managed resources should be disposed of in addition to unmanaged resources.
UpdateBuffers(DeviceContextProxy, IDeviceResources?)
Updates the buffers.
public bool UpdateBuffers(DeviceContextProxy context, IDeviceResources? deviceResources)
Parameters
contextDeviceContextProxyThe context.
deviceResourcesIDeviceResourcesThe device resources.
Returns
- bool
True if buffer updated.