Instance Method

fill(buffer:range:value:)

Fills a buffer with a constant value in each byte.

Declaration

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

Parameters

buffer

The buffer to fill.

range

The range of bytes to fill. The alignment and length of the range must both be a multiple of 4 bytes in macOS and 1 byte in iOS and tvOS. The length of the range must not be 0.

value

The value to write to each byte.

See Also

Generating Buffer and Texture Data

func generateMipmaps(for: MTLTexture)

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

Required.