---
title: "newTexture(texture:options:)"
framework: metalkit
role: symbol
role_heading: Instance Method
path: "metalkit/mtktextureloader/newtexture(texture:options:)"
---

# newTexture(texture:options:)

Synchronously loads image data and creates a Metal texture from the specified Model I/O texture.

## Declaration

```swift
func newTexture(texture: MDLTexture, options: [MTKTextureLoader.Option : Any]? = nil) throws -> any MTLTexture
```

## Parameters

- `texture`: A Model I/O texture object containing image data from which to create the texture.
- `options`: A dictionary describing any additional texture loading steps. See Texture Loading Options.

## Return Value

Return Value A fully loaded and initialized Metal texture, or nil if an error occurred.

## See Also

### Loading Textures from Model I/O Representations

- [newTexture(texture:options:completionHandler:)](metalkit/mtktextureloader/newtexture(texture:options:completionhandler:).md)
