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.