# Sandbox.Graphics.CopyTexture

## Overload 1

```csharp
static void CopyTexture(Texture srcTexture, Texture dstTexture)
```

Copies pixel data from one texture to another on the GPU.
This does not automatically resize or scale the texture, format and size should be equal.

### Parameters

- `srcTexture` (`Texture`)
- `dstTexture` (`Texture`)

## Overload 2

```csharp
static void CopyTexture(Texture srcTexture, Texture dstTexture, int srcMipSlice = 0, int srcArraySlice = 0, int srcMipLevels = 1, int dstMipSlice = 0, int dstArraySlice = 0, int dstMipLevels = 1)
```

> **Obsolete.** Use the CopyTexture overload without 'srcMipLevels' and 'dstMipLevels' parameters instead.

### Parameters

- `srcTexture` (`Texture`)
- `dstTexture` (`Texture`)
- `srcMipSlice` (`int`), default `0`
- `srcArraySlice` (`int`), default `0`
- `srcMipLevels` (`int`), default `1`
- `dstMipSlice` (`int`), default `0`
- `dstArraySlice` (`int`), default `0`
- `dstMipLevels` (`int`), default `1`

## Overload 3

```csharp
static void CopyTexture(Texture srcTexture, Texture dstTexture, int srcMipSlice = 0, int srcArraySlice = 0, int dstMipSlice = 0, int dstArraySlice = 0)
```

Copies pixel data from one texture to another on the GPU.
This does not automatically resize or scale the texture, format and size should be equal.
This one lets you copy to/from arrays / specific mips.

### Parameters

- `srcTexture` (`Texture`)
- `dstTexture` (`Texture`)
- `srcMipSlice` (`int`), default `0`
- `srcArraySlice` (`int`), default `0`
- `dstMipSlice` (`int`), default `0`
- `dstArraySlice` (`int`), default `0`

Declared in [Sandbox.Graphics](/api/Sandbox.Graphics).
Assembly: `Sandbox.Engine`.
