Instance Method

newSharedTextureWithHandle:

Creates a texture referencing an existing shared texture.

Required.

Declaration

- (id<MTLTexture>)newSharedTextureWithHandle:(MTLSharedTextureHandle *)sharedHandle;

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

- newTextureWithDescriptor:

Creates a texture.

Required.

- newTextureWithDescriptor:iosurface:plane:

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

Required.

- newSharedTextureWithDescriptor:

Create a texture that can be shared across process boundaries.

Required.

- newSamplerStateWithDescriptor:

Creates a sampler state object.

Required.