Show / Hide Table of Contents

Struct VertexLayoutDescription

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

Implements
System.IEquatable<VertexLayoutDescription>
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: Veldrid
Assembly: cs.temp.dll.dll
Syntax
public struct VertexLayoutDescription : IEquatable<VertexLayoutDescription>

Constructors

VertexLayoutDescription(UInt32, UInt32, VertexElementDescription[])

Constructs a new VertexLayoutDescription.

Declaration
public VertexLayoutDescription(uint stride, uint instanceStepRate, params VertexElementDescription[] elements)
Parameters
Type Name Description
System.UInt32 stride

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

System.UInt32 instanceStepRate

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.

VertexElementDescription[] elements

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

VertexLayoutDescription(UInt32, VertexElementDescription[])

Constructs a new VertexLayoutDescription.

Declaration
public VertexLayoutDescription(uint stride, params VertexElementDescription[] elements)
Parameters
Type Name Description
System.UInt32 stride

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

VertexElementDescription[] elements

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

VertexLayoutDescription(VertexElementDescription[])

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

Declaration
public VertexLayoutDescription(params VertexElementDescription[] elements)
Parameters
Type Name Description
VertexElementDescription[] elements

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.

Declaration
public VertexElementDescription[] Elements
Field Value
Type Description
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.

Declaration
public uint InstanceStepRate
Field Value
Type Description
System.UInt32

Stride

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

Declaration
public uint Stride
Field Value
Type Description
System.UInt32

Methods

Equals(VertexLayoutDescription)

Element-wise equality.

Declaration
public bool Equals(VertexLayoutDescription other)
Parameters
Type Name Description
VertexLayoutDescription other

The instance to compare to.

Returns
Type Description
System.Boolean

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

GetHashCode()

Returns the hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

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

Overrides
System.ValueType.GetHashCode()

Implements

System.IEquatable<T>
Back to top