Table of Contents

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

int

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

int

Indices

public int[]? Indices { get; set; }

Property Value

int[]

Sprites

public SpriteStruct[]? Sprites { get; set; }

Property Value

SpriteStruct[]

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

context DeviceContextProxy

The context.

vertexBufferStartSlot int

The vertex buffer slot. It will be changed to next available slot after binding.

deviceResources IDeviceResources

Returns

bool

OnDispose(bool)

Disposes of object resources.

protected override void OnDispose(bool disposeManagedResources)

Parameters

disposeManagedResources bool

If 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

context DeviceContextProxy

The context.

deviceResources IDeviceResources

The device resources.

Returns

bool

True if buffer updated.