VertexBufferBinding Struct
Namespace: Stride.GraphicsAssembly: 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>
Name | Description | |
---|---|---|
Constructors | ||
VertexBufferBinding(Buffer, VertexDeclaration, Int32, Int32, Int32) | Initializes a new instance of the VertexBufferBinding struct. |
|
Properties | ||
Buffer | Gets a vertex buffer. |
|
Count | Gets the number of vertex. |
|
Declaration | Gets the layout of the vertex buffer. |
|
Offset | Gets the offset (vertex index) between the beginning of the buffer and the vertex data to use. |
|
Stride | Gets the vertex stride. |
|
Methods | ||
Equals(VertexBufferBinding) | ||
Equals(Object) | ||
GetHashCode() |
Constructors
VertexBufferBinding(Buffer, VertexDeclaration, Int32, Int32, Int32)
Initializes a new instance of the VertexBufferBinding struct.
public VertexBufferBinding(Buffer vertexBuffer, VertexDeclaration vertexDeclaration, int vertexCount, int vertexStride = -1, int vertexOffset = 0)
Parameters
Type | Name | Description |
---|---|---|
Buffer | vertexBuffer | |
VertexDeclaration | vertexDeclaration | |
System.Int32 | vertexCount | |
System.Int32 | vertexStride | Jump size to the next element. if -1, it gets auto-discovered from the vertexDeclaration |
System.Int32 | vertexOffset | Offset (in Vertex ElementCount) from the beginning of the buffer to the first vertex to use. |
Properties
Buffer
Gets a vertex buffer.
public Buffer Buffer { get; }
Property Value
Type | Description |
---|---|
Buffer |
Count
Gets the number of vertex.
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The count. |
Declaration
Gets the layout of the vertex buffer.
public VertexDeclaration Declaration { get; }
Property Value
Type | Description |
---|---|
VertexDeclaration | The declaration. |
Offset
Gets the offset (vertex index) between the beginning of the buffer and the vertex data to use.
public int Offset { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Stride
Gets the vertex stride.
public int Stride { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Equals(VertexBufferBinding)
public bool Equals(VertexBufferBinding other)
Parameters
Type | Name | Description |
---|---|---|
VertexBufferBinding | other |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Object)
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetHashCode()
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |