Returns the texture’s image data for the specified mipmap level, organized such that its first pixel represents the top-left corner of the image.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- Model I/O
The mipmap level for which to access image data.
YESand the texture does not contain image data for the specified mipmap level (that is, the level parameter is greater than the texture’s
mipvalue) Model I/O generates image data for that mipmap level. If
NO, this method returns
nilfor mipmap levels where no image data exists.
The texture’s image data, or
nil if data is not available.
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 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 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 subclass capable of loading or generating its own data.