---
title: "makeTexture(descriptor:iosurface:plane:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtldevice/maketexture(descriptor:iosurface:plane:)"
---

# makeTexture(descriptor:iosurface:plane:)

Creates a texture instance that uses I/O surface to store its underlying data.

## Declaration

```swift
func makeTexture(descriptor: MTLTextureDescriptor, iosurface: IOSurfaceRef, plane: Int) -> (any MTLTexture)?
```

## Parameters

- `descriptor`: An doc://com.apple.metal/documentation/Metal/MTLTextureDescriptor instance.
- `iosurface`: An IOSurfaceRef instance.
- `plane`: A plane within iosurface the method sets as the texture’s underlying data.

## Return Value

Return Value A new MTLTexture instance if the method completed successfully; otherwise nil.

## See Also

### Creating textures

- [makeTexture(descriptor:)](metal/mtldevice/maketexture(descriptor:).md)
- [makeSharedTexture(descriptor:)](metal/mtldevice/makesharedtexture(descriptor:).md)
- [makeSharedTexture(handle:)](metal/mtldevice/makesharedtexture(handle:).md)
- [minimumLinearTextureAlignment(for:)](metal/mtldevice/minimumlineartexturealignment(for:).md)
- [minimumTextureBufferAlignment(for:)](metal/mtldevice/minimumtexturebufferalignment(for:).md)
