<!--
{
  "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/texelDataWithTopLeftOrigin()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLTexture(im)texelDataWithTopLeftOrigin"
  },
  "title" : "texelDataWithTopLeftOrigin()"
}
-->

# texelDataWithTopLeftOrigin()

Returns the texture’s image data, organized such that its first pixel represents the top-left corner of the image.

```
func texelDataWithTopLeftOrigin() -> Data?
```

## Return Value

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

## Discussion

If the texture was initialized with image data in bottom-left-origin format, the first call to this method creates and caches image data in top-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)