# GPUVertexAttribute

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

*** ** * ** ***


```
public final class GPUVertexAttribute
```

<br />

*** ** * ** ***

Describes a single vertex attribute.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/webgpu/GPUVertexAttribute#GPUVertexAttribute(kotlin.Int,kotlin.Long,kotlin.Int)(int format, long offset, int shaderLocation)` |

| ### Public methods |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUVertexAttribute#getFormat()()` The format of the vertex attribute data. |
| `final long` | `https://developer.android.com/reference/androidx/webgpu/GPUVertexAttribute#getOffset()()` The offset in bytes from the beginning of the vertex. |
| `final int` | `https://developer.android.com/reference/androidx/webgpu/GPUVertexAttribute#getShaderLocation()()` |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUVertexAttribute#setFormat(kotlin.Int)(int value)` The format of the vertex attribute data. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUVertexAttribute#setOffset(kotlin.Long)(long value)` The offset in bytes from the beginning of the vertex. |
| `final void` | `https://developer.android.com/reference/androidx/webgpu/GPUVertexAttribute#setShaderLocation(kotlin.Int)(int value)` |

## Public constructors

### GPUVertexAttribute

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

```
public GPUVertexAttribute(int format, long offset, int shaderLocation)
```

## Public methods

### getFormat

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

```
public final int getFormat()
```

The format of the vertex attribute data.

### getOffset

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

```
public final long getOffset()
```

The offset in bytes from the beginning of the vertex.

### getShaderLocation

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

```
public final int getShaderLocation()
```

### setFormat

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

```
public final void setFormat(int value)
```

The format of the vertex attribute data.

### setOffset

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

```
public final void setOffset(long value)
```

The offset in bytes from the beginning of the vertex.

### setShaderLocation

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

```
public final void setShaderLocation(int value)
```