Instance Property


A Boolean value that indicates whether the texture is a cube textures.


var isCube: Bool { get set }


Cube textures are used in skybox rendering, light probes, and environment maps. If this property’s value is true, the texture object represents a cube texture. In this case, the texture’s image data (accessible with the methods in Accessing Texture Data) contains six square images arranged vertically. The images represent the +X, -X, +Y, -Y, +Z, and -Z faces of the cube (in that order), and the dimensions property reflects this arrangement (height is six times width).

See Also

Examining Texture Attributes

var dimensions: vector_int2

The width and height, in texels, of the texture image.

var rowStride: Int

The number of bytes between the first texel in a row of image data and the first texel in the next row.

var channelCount: Int

The number of channels per texel.

var channelEncoding: MDLTextureChannelEncoding

The data format for each channel value per texel.

var mipLevelCount: Int

The number of mipmap levels contained in the texture image data.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software