<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLTextureDescriptor/textureCubeDescriptor(pixelFormat:size:mipmapped:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLTextureDescriptor(cm)textureCubeDescriptorWithPixelFormat:size:mipmapped:"
  },
  "title" : "textureCubeDescriptor(pixelFormat:size:mipmapped:)"
}
-->

# textureCubeDescriptor(pixelFormat:size:mipmapped:)

Creates a texture descriptor object for a cube texture.

```
class func textureCubeDescriptor(pixelFormat: MTLPixelFormat, size: Int, mipmapped: Bool) -> MTLTextureDescriptor
```

## Parameters

`pixelFormat`

The format describing how every pixel on the texture image is stored. The default value is [`MTLPixelFormat.rgba8Unorm`](/documentation/Metal/MTLPixelFormat/rgba8Unorm).

`size`

The width and height of each slice of the cube texture. The value needs to be greater than or equal to `1`.

`mipmapped`

A Boolean indicating whether the resulting image should be mipmapped. If <doc://com.apple.documentation/documentation/Swift/true>, then the [`mipmapLevelCount`](/documentation/Metal/MTLTextureDescriptor/mipmapLevelCount) property in the returned descriptor is computed from `width` and `height`. If <doc://com.apple.documentation/documentation/Swift/false>, then [`mipmapLevelCount`](/documentation/Metal/MTLTextureDescriptor/mipmapLevelCount) is `1`.

## Return Value

A pointer to a texture descriptor object for a cube texture.

## Discussion

For a cube texture, the property values describe one slice, which is any one of its six sides. Each slice is a square.

---

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)