Instance Method


Encodes a command to generate mipmaps for a texture from the base mipmap level up to the maximum level.



func generateMipmaps(for texture: MTLTexture)



The texture for which to generate mipmaps.


Mipmaps are generated with scaled images for all levels up to the maximum level. The mipmap level count for the texture must be greater than 1. Mipmap generation works only for textures with color-renderable and color-filterable pixel formats.

See Also

Generating Buffer and Texture Data

func fill(buffer: MTLBuffer, range: Range<Int>, value: UInt8)

Fills a buffer with a constant value in each byte.

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