Instance Property

sampleCount

The number of samples in each pixel.

Required.

Declaration

var sampleCount: Int { get }

Discussion

If textureType is not MTLTextureType.type2DMultisample, this value is 1.

See Also

Querying Texture Attributes

var textureType: MTLTextureType

The dimension and arrangement of the texture image data.

Required.

var pixelFormat: MTLPixelFormat

The format of pixels in the texture.

Required.

var width: Int

The width of the texture image for the base level mipmap, in pixels.

Required.

var height: Int

The height of the texture image for the base level mipmap, in pixels.

Required.

var depth: Int

The depth of the texture image for the base level mipmap, in pixels.

Required.

var mipmapLevelCount: Int

The number of mipmap levels in the texture.

Required.

var arrayLength: Int

The number of slices in the texture array.

Required.

var isFramebufferOnly: Bool

A Boolean value that indicates whether the texture can only be used as a render target.

Required.

var usage: MTLTextureUsage

Options that determine how you can use the texture.

Required.

var allowGPUOptimizedContents: Bool

A Boolean value indicating whether the GPU is allowed to adjust the contents of the texture to improve GPU performance.

Required.

var isShareable: Bool

A Boolean indicating whether this texture can be shared with other processes.

Required.

enum MTLTextureType

The dimension of each image, including whether multiple images are arranged into an array or a cube.

struct MTLTextureUsage

An enumeration for the various options that determine how you can use a texture.