---
title: "textureBufferDescriptor(with:width:resourceOptions:usage:)"
framework: metal
role: symbol
role_heading: Type Method
path: "metal/mtltexturedescriptor/texturebufferdescriptor(with:width:resourceoptions:usage:)"
---

# textureBufferDescriptor(with:width:resourceOptions:usage:)

Creates a texture descriptor object for a texture buffer.

## Declaration

```swift
class func textureBufferDescriptor(with pixelFormat: MTLPixelFormat, width: Int, resourceOptions: MTLResourceOptions = [], usage: MTLTextureUsage) -> MTLTextureDescriptor
```

## Parameters

- `pixelFormat`: The format describing how every pixel on the texture buffer is stored. The default value is doc://com.apple.metal/documentation/Metal/MTLPixelFormat/rgba8Unorm.
- `width`: The width of the texture buffer. The value needs to be greater than or equal to 1.
- `resourceOptions`: The access options to use for the new texture buffer.
- `usage`: The allowed usage of the new texture buffer.

## Return Value

Return Value A pointer to a texture descriptor object for a texture buffer.

## See Also

### Creating texture descriptors

- [texture2DDescriptor(pixelFormat:width:height:mipmapped:)](metal/mtltexturedescriptor/texture2ddescriptor(pixelformat:width:height:mipmapped:).md)
- [textureCubeDescriptor(pixelFormat:size:mipmapped:)](metal/mtltexturedescriptor/texturecubedescriptor(pixelformat:size:mipmapped:).md)
