<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLTexture/texelDataWithBottomLeftOrigin(atMipLevel:create:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLTexture(im)texelDataWithBottomLeftOriginAtMipLevel:create:"
  },
  "title" : "texelDataWithBottomLeftOrigin(atMipLevel:create:)"
}
-->

# texelDataWithBottomLeftOrigin(atMipLevel:create:)

Returns the texture’s image data for the specified mipmap level, organized such that its first pixel represents the bottom-left corner of the image.

```
func texelDataWithBottomLeftOrigin(atMipLevel level: Int, create: Bool) -> Data?
```

## Parameters

`level`

The mipmap level for which to access image data; must be less than or equal to the texture’s [`mipLevelCount`](/documentation/ModelIO/MDLTexture/mipLevelCount) value.

`create`

If <doc://com.apple.documentation/documentation/Swift/true> and the texture does not contain image data for the specified mipmap level (that is, the level parameter is greater than the texture’s [`mipLevelCount`](/documentation/ModelIO/MDLTexture/mipLevelCount) value) Model I/O generates image data for that mipmap level. If <doc://com.apple.documentation/documentation/Swift/false>, this method returns `nil` for mipmap levels where no image data exists.

## Return Value

The texture’s image data, or `nil` if data is not available.

## Discussion

Mipmapping is a technique that uses multiple sizes of a texture image to increase rendering performance. The image for mipmap level zero matches the size in the [`dimensions`](/documentation/ModelIO/MDLTexture/dimensions) property. Mipmap level 1 is an image at half the original dimensions; level 2 is at quarter size; and so on.

If the texture was initialized with image data in top-left-origin format, the first call to this method creates and caches image data in bottom-left-origin format.

This method returns `nil` if the texture was not initialized with image data and is not a [`MDLTexture`](/documentation/ModelIO/MDLTexture) subclass capable of loading or generating its own data.

---

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)