Instance Method

initWithDevice:imageDescriptor:

Initializes an empty image.

Declaration

- (instancetype)initWithDevice:(id<MTLDevice>)device imageDescriptor:(const MPSImageDescriptor *)imageDescriptor;

Parameters

device

The device on which the image will be used.

imageDescriptor

The image descriptor.

Return Value

A valid MPSImage object or nil, if failure.

Discussion

Storage for the image data is allocated lazily on the first use of the MPSImage object, or when the texture property is first read.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software