Initializes a texture object with the specified image data and properties.
- iOS 9.0+
- macOS 10.11+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- Model I/O
The texture image data. Pass
nilfor subclasses of
MDLTexturethat create their own texture data.
YES, the image data is organized such that its first pixel represents the top left corner of the image. If
NO, the first pixel represents the bottom left corner of the image.
A descriptive name for the texture. Use the
nameproperty to reference this name after initialization.
The texel dimensions (width and height) of the texture image.
The number of bytes between the first texel in a row of image data and the first texel in the next row. If zero, the texture does not support direct addressing of texels—this is the case for some compressed texture formats.
The number of channels per texel—for example, 1 for a grayscale texture, 3 for an RGB color texture, or 4 for RGBA.
The data format for each channel value per texel—for example, 8-bit integer or 32-bit floating point. For possible values, see
YES, the image data represents an arrangement of six square images, each of which is a face for a cube texture. If
NO, the texture is a single 2D image.
A new texture object.