Contents

makeSharedTexture(descriptor:)

Creates a texture that you can share across process boundaries.

Declaration

func makeSharedTexture(descriptor: MTLTextureDescriptor) -> (any MTLTexture)?

Parameters

Return Value

A new MTLTexture instance if the method completed successfully; otherwise nil.

Discussion

You can create a shared texture but only with storageModePrivate. You can share the texture with another process by:

  1. Creating a texture handle (see makeSharedTextureHandle())

  2. Passing the texture handle to the other process

  3. Creating a texture in the other process by calling the makeSharedTexture(handle:)method

See Also

Creating textures