Struct VertexBufferBinding
Defines how a vertex buffer is bound to the graphics device for rendering.
public struct VertexBufferBinding
- Inherited Members
Constructors
VertexBufferBinding(VertexBuffer)
Creates an instance of VertexBufferBinding.
public VertexBufferBinding(VertexBuffer vertexBuffer)
Parameters
vertexBuffer
VertexBufferThe vertex buffer to bind.
VertexBufferBinding(VertexBuffer, int)
Creates an instance of VertexBufferBinding.
public VertexBufferBinding(VertexBuffer vertexBuffer, int vertexOffset)
Parameters
vertexBuffer
VertexBufferThe vertex buffer to bind.
vertexOffset
intThe index of the first vertex in the vertex buffer to use.
VertexBufferBinding(VertexBuffer, int, int)
Creates an instance of VertexBufferBinding.
public VertexBufferBinding(VertexBuffer vertexBuffer, int vertexOffset, int instanceFrequency)
Parameters
vertexBuffer
VertexBufferThe vertex buffer to bind.
vertexOffset
intThe index of the first vertex in the vertex buffer to use.
instanceFrequency
intThe number of instances to draw using the same per-instance data before advancing in the buffer by one element. This value must be 0 for an element that contains per-vertex data and greater than 0 for per-instance data.
Exceptions
- ArgumentNullException
vertexBuffer
is null.- ArgumentOutOfRangeException
vertexOffset
orinstanceFrequency
is invalid.
Properties
InstanceFrequency
Gets the number of instances to draw using the same per-instance data before advancing in the buffer by one element.
public int InstanceFrequency { get; }
Property Value
- int
The number of instances to draw using the same per-instance data before advancing in the buffer by one element. This value must be 0 for an element that contains per-vertex data and greater than 0 for per-instance data.
VertexBuffer
Gets the vertex buffer.
public VertexBuffer VertexBuffer { get; }
Property Value
- VertexBuffer
The vertex buffer.
VertexOffset
Gets the index of the first vertex in the vertex buffer to use.
public int VertexOffset { get; }
Property Value
- int
The index of the first vertex in the vertex buffer to use.