---
title: Onscreen presentation
framework: metal
role: collectionGroup
path: metal/onscreen-presentation
---

# Onscreen presentation

Show the output from a GPU’s rendering pass to the user in your app.

## Overview

Overview A texture contains visual data that you may want to display onscreen, such as a filtered image or a frame of animation in a game. To display a texture on a device’s screen, you need to create or acquire a drawable texture from Core Animation. In Metal, a drawable is a texture that bridges the display subsystem within Core Animation to Metal. You can use a drawable as the output of a render pass and then present it to a display with its MTLDrawable protocol. note: You can’t present a texture you directly create in Metal unless you copy its content to a drawable using a blit pass (see Blit passes). To display content on a device’s screen, add one of these to your Metal app: A CAMetalLayer instance within a custom view class An MTKView instance With a CAMetalLayer instance, your app can get drawable instances by calling its nextDrawable() method. Each drawable conforms to the CAMetalDrawable protocol, which has a texture property that a render pass can use as its output. See Creating a custom Metal view for more information. Alternatively, your app can use an MTKView and its currentDrawable property. This MetalKit class provides a default implementation of a Metal-aware view that uses an underlying CAMetalLayer instance. A MetalKit view provides a quick and easy way to present your app’s content, but gives you less control than using a CAMetalLayer directly. See Using Metal to draw a view’s contents for more information. Whichever mechanism you choose, pay close attention to how your app handles drawables. Each drawable comes from a limited and reusable resource pool. A drawable may not always be available when your app requests one. When that happens, Core Animation blocks the calling thread until a drawable becomes available — usually at the display’s next refresh interval.

## Topics

### Presenting with core animation

- [Creating a custom Metal view](metal/creating-a-custom-metal-view.md)
- [Reading pixel data from a drawable texture](metal/reading-pixel-data-from-a-drawable-texture.md)
- [Achieving smooth frame rates with a Metal display link](metal/achieving-smooth-frame-rates-with-a-metal-display-link.md)
- [CAMetalLayer](quartzcore/cametallayer.md)
- [CAMetalDrawable](quartzcore/cametaldrawable.md)

### Presenting with MetalKit

- [Using Metal to draw a view’s contents](metal/using-metal-to-draw-a-view's-contents.md)
- [MTKView](metalkit/mtkview.md)
- [MTKViewDelegate](metalkit/mtkviewdelegate.md)

## See Also

### Presentation

- [Managing your game window for Metal in macOS](metal/managing-your-game-window-for-metal-in-macos.md)
- [Managing your Metal app window in iPadOS](metal/managing-your-metal-app-window-in-ipados.md)
- [Adapting your game interface for smaller screens](metal/adapting-your-game-interface-for-smaller-screens.md)
- [HDR content](metal/hdr-content.md)
