<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalKit",
  "identifier" : "/documentation/MetalKit/MTKTextureLoader/Option",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "MetalKit"
    ],
    "preciseIdentifier" : "c:@T@MTKTextureLoaderOption"
  },
  "title" : "MTKTextureLoader.Option"
}
-->

# MTKTextureLoader.Option

Keys and values used to specify loading options.

```
struct Option
```

## Topics

### Creating Texture Loading Options

[`init(rawValue:)`](/documentation/MetalKit/MTKTextureLoader/Option/init(rawValue:))

Creates a texture loader option from a raw string value.

### Specifying Mipmap Options

[`allocateMipmaps`](/documentation/MetalKit/MTKTextureLoader/Option/allocateMipmaps)

A key used to specify whether the texture loader should allocate memory for mipmaps in the texture.

[`generateMipmaps`](/documentation/MetalKit/MTKTextureLoader/Option/generateMipmaps)

A key used to specify whether the texture loader should generate mipmaps for the texture.

### Specifying Resource Options

[`textureCPUCacheMode`](/documentation/MetalKit/MTKTextureLoader/Option/textureCPUCacheMode)

A key used to specify the CPU cache mode for the texture.

[`textureStorageMode`](/documentation/MetalKit/MTKTextureLoader/Option/textureStorageMode)

A key used to specify the storage mode for the texture.

[`textureUsage`](/documentation/MetalKit/MTKTextureLoader/Option/textureUsage)

A key used to specify the intended usage of the texture.

### Specifying Origin Information

[`origin`](/documentation/MetalKit/MTKTextureLoader/Option/origin)

A key used to specify when to flip the pixel coordinates of the texture.

[`MTKTextureLoader.Origin`](/documentation/MetalKit/MTKTextureLoader/Origin)

Options for specifying when to flip the pixel coordinates of the texture.

### Specifying Cube Layout

[`cubeLayout`](/documentation/MetalKit/MTKTextureLoader/Option/cubeLayout)

A key used to specify how cube texture data is arranged in the source image.

[`MTKTextureLoader.CubeLayout`](/documentation/MetalKit/MTKTextureLoader/CubeLayout)

Options for specifying how cube texture data is arranged in the source image.

### Specifying sRGB Options

[`SRGB`](/documentation/MetalKit/MTKTextureLoader/Option/SRGB)

A key used to specify whether the texture data is stored as sRGB image data.

### Type Properties

[`loadAsArray`](/documentation/MetalKit/MTKTextureLoader/Option/loadAsArray)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)