Protocol

CAMetalDrawable

A Metal drawable associated with a Core Animation layer.

Declaration

protocol CAMetalDrawable

Overview

Objects that implement this protocol are owned by a CAMetalLayer object. Don’t implement this protocol yourself; instead, see CAMetalLayer for more information about how to request drawable objects from the layer.

Topics

Getting the Drawable's Texture

var texture: MTLTexture

A Metal texture object that contains the drawable’s contents.

Required.

Getting the Owning Layer

var layer: CAMetalLayer

The layer that owns this drawable object.

Required.

Relationships

Inherits From

See Also

Metal and OpenGL

class CAMetalLayer

A Core Animation layer that Metal can render into, typically to be displayed onscreen.

class CAEAGLLayer

A layer that supports drawing OpenGL content in iOS and tvOS applications.

Deprecated
class CAEDRMetadata

Metadata describing how extended dynamic range (EDR) values should be tone mapped.

class CAOpenGLLayer

A layer that provides a layer suitable for rendering OpenGL content.

Deprecated
class CARenderer

A layer that allows an application to render a layer tree into a Core OpenGL context.