Struct VertexBufferBinding
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
BuffervertexDeclaration
VertexDeclarationvertexCount
intvertexStride
intJump size to the next element. if -1, it gets auto-discovered from the vertexDeclaration
vertexOffset
intOffset (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
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
Stride
Gets the vertex stride.
public readonly int Stride { get; }
Property Value
Methods
Equals(VertexBufferBinding)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(VertexBufferBinding other)
Parameters
other
VertexBufferBindingAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
obj
objectThe 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.