Instance Method

setTexture(_:index:)

Encodes a reference to a texture into the argument buffer.

Required.

Declaration

func setTexture(_ texture: MTLTexture?, index: Int)

Parameters

texture

The texture to encode.

index

The index of the texture within the argument buffer. This value corresponds to either the index ID of a Metal shading language declaration or the index field of a MTLArgumentDescriptor object.

See Also

Encoding Textures

func setTextures([MTLTexture?], range: Range<Int>)

Encodes references to an array of textures into the argument buffer.