# Sandbox.Graphics.Draw

## Overload 1

```csharp
static void Draw(GpuBuffer<T> vertexBuffer, Material material, int startVertex = 0, int vertexCount = 0, RenderAttributes attributes = null, PrimitiveType primitiveType = 5)
```

### Parameters

- `vertexBuffer` (`GpuBuffer<T>`)
- `material` (`Material`)
- `startVertex` (`int`), default `0`
- `vertexCount` (`int`), default `0`
- `attributes` (`RenderAttributes`), default `null`
- `primitiveType` (`PrimitiveType`), default `5`

## Overload 2

```csharp
static void Draw(GpuBuffer<T> vertexBuffer, GpuBuffer indexBuffer, Material material, int startIndex = 0, int indexCount = 0, RenderAttributes attributes = null, PrimitiveType primitiveType = 5)
```

### Parameters

- `vertexBuffer` (`GpuBuffer<T>`)
- `indexBuffer` (`GpuBuffer`)
- `material` (`Material`)
- `startIndex` (`int`), default `0`
- `indexCount` (`int`), default `0`
- `attributes` (`RenderAttributes`), default `null`
- `primitiveType` (`PrimitiveType`), default `5`

## Overload 3

```csharp
static void Draw(System.Span<Vertex> vertices, int vertCount, Material material, RenderAttributes attributes = null, PrimitiveType primitiveType = 5)
```

### Parameters

- `vertices` (`System.Span<Vertex>`)
- `vertCount` (`int`)
- `material` (`Material`)
- `attributes` (`RenderAttributes`), default `null`
- `primitiveType` (`PrimitiveType`), default `5`

## Overload 4

```csharp
static void Draw(List<Vertex> vertices, int vertCount, Material material, RenderAttributes attributes = null, PrimitiveType primitiveType = 5)
```

### Parameters

- `vertices` (`List<Vertex>`)
- `vertCount` (`int`)
- `material` (`Material`)
- `attributes` (`RenderAttributes`), default `null`
- `primitiveType` (`PrimitiveType`), default `5`

## Overload 5

```csharp
static void Draw(System.Span<Vertex> vertices, int vertCount, System.Span<ushort> indices, int indexCount, Material material, RenderAttributes attributes = null, PrimitiveType primitiveType = 5)
```

### Parameters

- `vertices` (`System.Span<Vertex>`)
- `vertCount` (`int`)
- `indices` (`System.Span<ushort>`)
- `indexCount` (`int`)
- `material` (`Material`)
- `attributes` (`RenderAttributes`), default `null`
- `primitiveType` (`PrimitiveType`), default `5`

Declared in [Sandbox.Graphics](/api/Sandbox.Graphics).
Assembly: `Sandbox.Engine`.
