Instance Method

newRenderPipelineStateWithDescriptor:error:

Synchronously creates a render pipeline state object.

Required.

Declaration

- (id<MTLRenderPipelineState>)newRenderPipelineStateWithDescriptor:(MTLRenderPipelineDescriptor *)descriptor error:(NSError * _Nullable *)error;

Parameters

descriptor

A descriptor object that contains graphics rendering state properties, including rasterization, visibility, programmable shader, and blend state.

error

On input, a pointer to an error object variable. On output, an error object that describes any error that occurred, or nil if the operation succeeded.

Return Value

A new object with the compiled graphics rendering pipeline state.

Discussion

To use the graphics rendering pipeline state for a rendering pass, call the setRenderPipelineState: method of a MTLRenderCommandEncoder object with the MTLRenderPipelineState object.

See Also

Creating a Render Pipeline

- newRenderPipelineStateWithDescriptor:completionHandler:

Asynchronously creates a render pipeline state object.

Required.

- newRenderPipelineStateWithDescriptor:options:completionHandler:

Asynchronously creates a render pipeline state object and associated reflection information.

Required.

- newRenderPipelineStateWithDescriptor:options:reflection:error:

Synchronously creates a render pipeline state object and associated reflection information.

Required.

- newRenderPipelineStateWithTileDescriptor:options:completionHandler:

Asynchronously creates a render pipeline state object, and associated reflection information, for a tile shader.

Required.

- newRenderPipelineStateWithTileDescriptor:options:reflection:error:

Synchronously creates a render pipeline state object, and associated reflection information, for a tile shader.

Required.