# Sandbox.Graphics.Clear

## Overload 1

```csharp
static void Clear(Color color, bool clearColor = True, bool clearDepth = True, bool clearStencil = True)
```

Clear the current drawing context to given color.

### Parameters

- `color` (`Color`): Color to clear to.
- `clearColor` (`bool`), default `True`: Whether to clear the color buffer at all.
- `clearDepth` (`bool`), default `True`: Whether to clear the depth buffer.
- `clearStencil` (`bool`), default `True`: Whether to clear the stencil buffer.

## Overload 2

```csharp
static void Clear(bool clearColor = True, bool clearDepth = True)
```

Clear the current drawing context to given color.

### Parameters

- `clearColor` (`bool`), default `True`: Whether to clear the color buffer to transparent color.
- `clearDepth` (`bool`), default `True`: Whether to clear the depth buffer.

Declared in [Sandbox.Graphics](/api/Sandbox.Graphics).
Assembly: `Sandbox.Engine`.
