Table of Contents

Struct VertexBufferBinding

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

Binding structure that specifies a vertex buffer and other per-vertex parameters (such as offset and instancing) for a graphics device.

[DataSerializer(typeof(VertexBufferBinding.Serializer))]
public struct VertexBufferBinding : IEquatable<VertexBufferBinding>
Implements
Inherited Members
Extension Methods

Constructors

VertexBufferBinding(Buffer, VertexDeclaration, int, int, int)

Initializes a new instance of the VertexBufferBinding struct.

public VertexBufferBinding(Buffer vertexBuffer, VertexDeclaration vertexDeclaration, int vertexCount, int vertexStride = -1, int vertexOffset = 0)

Parameters

vertexBuffer Buffer
vertexDeclaration VertexDeclaration
vertexCount int
vertexStride int

Jump size to the next element. if -1, it gets auto-discovered from the vertexDeclaration

vertexOffset int

Offset (in Vertex ElementCount) from the beginning of the buffer to the first vertex to use.

Properties

Buffer

Gets a vertex buffer.

public readonly Buffer Buffer { get; }

Property Value

Buffer

Count

Gets the number of vertex.

public readonly int Count { get; }

Property Value

int

The count.

Declaration

Gets the layout of the vertex buffer.

public readonly VertexDeclaration Declaration { get; }

Property Value

VertexDeclaration

The declaration.

Offset

Gets the offset (vertex index) between the beginning of the buffer and the vertex data to use.

public readonly int Offset { get; }

Property Value

int

Stride

Gets the vertex stride.

public readonly int Stride { get; }

Property Value

int

Methods

Equals(VertexBufferBinding)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(VertexBufferBinding other)

Parameters

other VertexBufferBinding

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

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.