class
VertexBuffer
public class VertexBuffer Constructors
VertexBuffer() Properties
| Name | Type | Description |
|---|---|---|
Indexed | Boolean | Whether this vertex buffer has any indexes. This is set by Boolean). |
Methods
virtual Void Clear() Clear all vertices and indices, and resets Default.
virtual Void Init(Boolean useIndexBuffer) Clear the buffer and set whether it will have indices.
useIndexBuffer — Whether this buffer will have indices. Affects Indexed. Void Add(Vertex v) Add a vertex
Void AddIndex(Int32 i) Add an index. This is relative to the top of the vertex buffer. So 0 is Vertex.Count., 1 is Vertex.Count -1
InvalidOperationException — Thrown when Indexed is false. Void AddTriangleIndex(Int32 a, Int32 b, Int32 c) Add a triangle by indices. This is relative to the top of the vertex buffer. So 0 is Vertex.Count.
InvalidOperationException — Thrown when Indexed is false. Void AddRawIndex(Int32 i) Add an index. This is NOT relative to the top of the vertex buffer.
InvalidOperationException — Thrown when Indexed is false. Void Draw(Material material, RenderAttributes attributes = null) Draw this mesh using Material
Fields
| Name | Type | Description |
|---|---|---|
Default | Vertex |