Instance Method

makeSharedTexture(handle:)

Creates a texture referencing an existing shared texture.

Required.

Declaration

func makeSharedTexture(handle sharedHandle: MTLSharedTextureHandle) -> MTLTexture?

Parameters

sharedHandle

A handle to a shared texture.

Discussion

This method should be called on the same MTLDevice on which the shared texture was originally created. To identify which device it was, you can use the device property of the MTLSharedTextureHandle object.

See Also

Creating Textures and Samplers

func makeTexture(descriptor: MTLTextureDescriptor, iosurface: IOSurfaceRef, plane: Int) -> MTLTexture?

Creates a texture using an IOSurface to store the texture data.

Required.

func makeSharedTexture(descriptor: MTLTextureDescriptor) -> MTLTexture?

Create a texture that can be shared across process boundaries.

Required.