# TextureUsage

Artifact: [androidx.webgpu:webgpu](https://developer.android.com/jetpack/androidx/releases/webgpu) [View Source](https://cs.android.com/search?q=file:androidx/webgpu/TextureUsage.kt+class:androidx.webgpu.TextureUsage) Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

*** ** * ** ***


```
class TextureUsage
```

<br />

*** ** * ** ***

Defines the valid usages for a texture.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/TextureUsage#CopyDst() = 2` Allows the texture to be the destination of a copy operation. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/TextureUsage#CopySrc() = 1` Allows the texture to be the source of a copy operation. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/TextureUsage#None() = 0` No usage is specified. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/TextureUsage#RenderAttachment() = 16` Allows the texture to be used as a render attachment. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/TextureUsage#StorageBinding() = 8` Allows the texture to be used as a storage texture. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/TextureUsage#TextureBinding() = 4` Allows the texture to be sampled in a shader. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/TextureUsage#TransientAttachment() = 32` |

| ### Public companion functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/TextureUsage#toString(kotlin.Int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

## Constants

### CopyDst

```
const val CopyDst = 2: Int
```

Allows the texture to be the destination of a copy operation.

### CopySrc

```
const val CopySrc = 1: Int
```

Allows the texture to be the source of a copy operation.

### None

```
const val None = 0: Int
```

No usage is specified.

### RenderAttachment

```
const val RenderAttachment = 16: Int
```

Allows the texture to be used as a render attachment.

### StorageBinding

```
const val StorageBinding = 8: Int
```

Allows the texture to be used as a storage texture.

### TextureBinding

```
const val TextureBinding = 4: Int
```

Allows the texture to be sampled in a shader.

### TransientAttachment

```
const val TransientAttachment = 32: Int
```

## Public companion functions

### toString

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
fun toString(value: Int): String
```