# Sandbox.VertexBuffer

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`

## Constructors

- [`VertexBuffer`](/api/Sandbox.VertexBuffer/.ctor)

## Fields

- [`Default`](/api/Sandbox.VertexBuffer/Default)

## Properties

- [`Indexed`](/api/Sandbox.VertexBuffer/Indexed): Whether this vertex buffer has any indexes. This is set by [Sandbox.VertexBuffer.Init](/api/Sandbox.VertexBuffer/Init).

## Methods

- [`Add`](/api/Sandbox.VertexBuffer/Add): Add a vertex
- [`AddCube`](/api/Sandbox.VertexBuffer/AddCube): Add a cube to the vertex buffer. Will include indices if they're enabled.
- [`AddIndex`](/api/Sandbox.VertexBuffer/AddIndex): Add an index. This is relative to the top of the vertex buffer. So 0 is Vertex.Count., 1 is Vertex.Count -1
- [`AddQuad`](/api/Sandbox.VertexBuffer/AddQuad): Add a quad to the vertex buffer. Will include indices if they're enabled.
- [`AddRawIndex`](/api/Sandbox.VertexBuffer/AddRawIndex): Add an index. This is NOT relative to the top of the vertex buffer.
- [`AddTriangle`](/api/Sandbox.VertexBuffer/AddTriangle): Add a triangle to the vertex buffer. Will include indices if they're enabled.
- [`AddTriangleIndex`](/api/Sandbox.VertexBuffer/AddTriangleIndex): Add a triangle by indices. This is relative to the top of the vertex buffer. So 0 is Vertex.Count.
- [`Clear`](/api/Sandbox.VertexBuffer/Clear): Clear all vertices and indices, and resets [Sandbox.VertexBuffer.Default](/api/Sandbox.VertexBuffer/Default).
- [`Draw`](/api/Sandbox.VertexBuffer/Draw): Draw this mesh using Material
- [`Init`](/api/Sandbox.VertexBuffer/Init): Clear the buffer and set whether it will have indices.
