# Sandbox.Graphics.ResourceBarrierTransition

## Overload 1

```csharp
static void ResourceBarrierTransition(Texture texture, ResourceState state, int mip = -1)
```

Executes a barrier transition for the given GPU Texture Resource.
Transitions the texture resource to a new pipeline stage and access state.

### Parameters

- `texture` (`Texture`): The texture to transition.
- `state` (`ResourceState`): The new resource state for the texture.
- `mip` (`int`), default `-1`: The mip level to transition (-1 for all mips).

## Overload 2

```csharp
static void ResourceBarrierTransition(GpuBuffer<T> buffer, ResourceState state)
```

### Parameters

- `buffer` (`GpuBuffer<T>`)
- `state` (`ResourceState`)

## Overload 3

```csharp
static void ResourceBarrierTransition(GpuBuffer buffer, ResourceState state)
```

Executes a barrier transition for the given GPU Buffer Resource.
Transitions the buffer resource to a new pipeline stage and access state.

### Parameters

- `buffer` (`GpuBuffer`): The GPU buffer to transition.
- `state` (`ResourceState`): The new resource state for the buffer.

## Overload 4

```csharp
static void ResourceBarrierTransition(GpuBuffer<T> buffer, ResourceState before, ResourceState after)
```

### Parameters

- `buffer` (`GpuBuffer<T>`)
- `before` (`ResourceState`)
- `after` (`ResourceState`)

## Overload 5

```csharp
static void ResourceBarrierTransition(GpuBuffer buffer, ResourceState before, ResourceState after)
```

Executes a barrier transition for the given GPU Buffer Resource.
Transitions the buffer resource from a known source state to a specified destination state.

### Parameters

- `buffer` (`GpuBuffer`): The GPU buffer to transition.
- `before` (`ResourceState`): The current resource state of the buffer.
- `after` (`ResourceState`): The desired resource state of the buffer after the transition.

Declared in [Sandbox.Graphics](/api/Sandbox.Graphics).
Assembly: `Sandbox.Engine`.
