Table of Contents

Struct VertexLayoutDescription

Namespace
NeoVeldrid
Assembly
NeoVeldrid.dll

Describes the layout of vertex data in a single DeviceBuffer used as a vertex buffer.

public struct VertexLayoutDescription : IEquatable<VertexLayoutDescription>
Implements
Inherited Members

Constructors

VertexLayoutDescription(params VertexElementDescription[])

Constructs a new VertexLayoutDescription. The stride is assumed to be the sum of the size of all elements.

public VertexLayoutDescription(params VertexElementDescription[] elements)

Parameters

elements VertexElementDescription[]

An array of VertexElementDescription objects, each describing a single element of vertex data.

VertexLayoutDescription(uint, params VertexElementDescription[])

Constructs a new VertexLayoutDescription.

public VertexLayoutDescription(uint stride, params VertexElementDescription[] elements)

Parameters

stride uint

The number of bytes in between successive elements in the DeviceBuffer.

elements VertexElementDescription[]

An array of VertexElementDescription objects, each describing a single element of vertex data.

VertexLayoutDescription(uint, uint, params VertexElementDescription[])

Constructs a new VertexLayoutDescription.

public VertexLayoutDescription(uint stride, uint instanceStepRate, params VertexElementDescription[] elements)

Parameters

stride uint

The number of bytes in between successive elements in the DeviceBuffer.

instanceStepRate uint

A value controlling how often data for instances is advanced for this element. For per-vertex elements, this value should be 0. For example, an InstanceStepRate of 3 indicates that 3 instances will be drawn with the same value for this element. The next 3 instances will be drawn with the next value for this element, and so on.

elements VertexElementDescription[]

An array of VertexElementDescription objects, each describing a single element of vertex data.

Fields

Elements

An array of VertexElementDescription objects, each describing a single element of vertex data.

public VertexElementDescription[] Elements

Field Value

VertexElementDescription[]

InstanceStepRate

A value controlling how often data for instances is advanced for this layout. For per-vertex elements, this value should be 0. For example, an InstanceStepRate of 3 indicates that 3 instances will be drawn with the same value for this layout. The next 3 instances will be drawn with the next value, and so on.

public uint InstanceStepRate

Field Value

uint

Stride

The number of bytes in between successive elements in the DeviceBuffer.

public uint Stride

Field Value

uint

Methods

Equals(VertexLayoutDescription)

Element-wise equality.

public bool Equals(VertexLayoutDescription other)

Parameters

other VertexLayoutDescription

The instance to compare to.

Returns

bool

True if all elements and all array elements are equal; false otherswise.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.