Presentation Objects

Various user interface elements you use to display your Metal content onscreen.

Topics

Metal Drawables

Render or write to a drawable and display it on the screen. Drawables are displayable resources available through either MetalKit or Core Animation.

Obtaining, Presenting, and Releasing Drawables

Hold drawables as briefly as possible to avoid blocking your own work.

protocol MTLDrawable

A displayable resource that can be rendered or written to.

protocol CAMetalDrawable

A displayable resource that can be rendered or written to by Metal.

MetalKit View

Use a specialized view, with an optional drawing delegate, to create a display-centric Metal app. Views are typically used to display graphics render targets, but may also be used to display the results of compute-processing tasks.

class MTKView

A specialized view that creates, configures, and displays Metal objects.

protocol MTKViewDelegate

Methods for responding to a MetalKit view's drawing and resizing events.

Core Animation Layer

Use a specialized backing layer to create a display-centric Metal app. Views are typically used to display graphics render targets, but may also be used to display the results of compute-processing tasks.

class CAMetalLayer

A layer that manages a pool of Metal drawables.

See Also

Graphics

Hello Triangle

Demonstrates how to render a simple 2D triangle.

Basic Buffers

Demonstrates how to manage hundreds of vertices with a vertex buffer.

Basic Texturing

Demonstrates how to load image data and texture a quad.

protocol MTLRenderCommandEncoder

The object to use for encoding commands for a render pass.

protocol MTLParallelRenderCommandEncoder

An object that splits up a single render pass so it can be simultaneously encoded from multiple threads.

Render Pass

A collection of commands that updates a set of render targets.

Render Pipeline

A specification for how graphics primitives should be rendered.

Vertex Data

Points that specify precise locations within the textures associated with graphics processing.