# Sandbox.Graphics.GenerateMipMaps

```csharp
static void GenerateMipMaps(Texture texture, DownsampleMethod downsampleMethod = 0, int initialMip = 0, int numMips = -1)
```

Generate the mip maps for this texture. Obviously the texture needs to support mip maps.

### Parameters

- `texture` (`Texture`)
- `downsampleMethod` (`DownsampleMethod`), default `0`
- `initialMip` (`int`), default `0`
- `numMips` (`int`), default `-1`

Declared in [Sandbox.Graphics](/api/Sandbox.Graphics).
Assembly: `Sandbox.Engine`.
