<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CompositorServices",
  "identifier" : "/documentation/CompositorServices",
  "metadataVersion" : "0.1.0",
  "role" : "Framework",
  "symbol" : {
    "kind" : "Framework",
    "modules" : [
      "Compositor Services"
    ],
    "preciseIdentifier" : "CompositorServices"
  },
  "title" : "Compositor Services"
}
-->

# Compositor Services

Take control of the drawing environment and render your own content using Metal.

## Overview

Compositor Services lets you draw directly to the device’s displays using Metal and your own rendering engine.
Use this framework to create a fully immersive scene in your app that doesn’t require integration with the person’s surroundings.

When you present an immersive space with [`CompositorLayer`](/documentation/CompositorServices/CompositorLayer) content from your app,
you receive a [`LayerRenderer`](/documentation/CompositorServices/LayerRenderer) with the information you need to set up your Metal drawing environment.
Use the layer to start your rendering loop and deliver successive frames of content.
The layer provides the timing information you need to deliver frames at the refresh rate of the display.
It also provides the Metal textures and other information that you need to draw content on the device displays.

For more information about how to draw your app’s content using Metal,
see <doc://com.apple.documentation/documentation/Metal>.

## Topics

### App integration

[Drawing fully immersive content using Metal](/documentation/CompositorServices/drawing-fully-immersive-content-using-metal)

Create a fully immersive experience in visionOS using a custom Metal-based rendering engine.

[Interacting with virtual content blended with passthrough](/documentation/CompositorServices/interacting-with-virtual-content-blended-with-passthrough)

Present a mixed immersion style space to draw content in a person’s surroundings,
and choose how upper limbs appear with respect to rendered content.

[Rendering hover effects in Metal immersive apps](/documentation/CompositorServices/rendering_hover_effects_in_metal_immersive_apps)

Change the appearance of a rendered onscreen element when a player gazes at it.

[`struct CompositorLayer`](/documentation/CompositorServices/CompositorLayer)

A type that you use with an immersive space to display fully immersive content using Metal.

[`protocol CompositorLayerConfiguration`](/documentation/CompositorServices/CompositorLayerConfiguration)

An interface for specifying the texture configurations and rendering behaviors to use with your Metal rendering engine.

[`struct DefaultCompositorLayerConfiguration`](/documentation/CompositorServices/DefaultCompositorLayerConfiguration)

A type that configures the layer with the default texture configurations and rendering behaviors for the current device.

### Render-loop setup

[`class LayerRenderer`](/documentation/CompositorServices/LayerRenderer)

A type that provides the Metal types and timing information you need to draw your content.

[`struct Frame`](/documentation/CompositorServices/LayerRenderer/Frame)

A type that provides access to the timing information and data types you need to render a single frame of content.

### Render-loop setup

[Layer renderer](/documentation/CompositorServices/layer-renderer)

A type that provides the Metal types and timing information you need to draw your content.

[Frames](/documentation/CompositorServices/frames)

A type that represents a single frame of content, manages the pace of animations,
and provides access to the drawable environment.

[Utilities](/documentation/CompositorServices/utilities)

Common types and utilities to manage your app’s rendering process.

### Drawing environment

[`struct Drawable`](/documentation/CompositorServices/LayerRenderer/Drawable)

A type that provides the textures and information you need to draw a frame of content.

[`struct View`](/documentation/CompositorServices/LayerRenderer/Drawable/View)

A type that provides information on how to render content into the frame’s textures.

### Drawing environment

[Drawable](/documentation/CompositorServices/drawable)

A type that provides information on how to render content into the frame’s textures.

[View](/documentation/CompositorServices/view)

A type that manages the viewport and texture details for each portion of your frame’s content.

### Errors

[`enum LayerRendererConfigurationError`](/documentation/CompositorServices/LayerRendererConfigurationError)

Errors that can occur when configuring layers.

[`extern CFErrorDomain const cp_layer_renderer_configuration_error_domain;`](/documentation/CompositorServices/cp_layer_renderer_configuration_error_domain)

The domain for errors that occur during layer configuration.

[`cp_layer_renderer_configuration_error_code`](/documentation/CompositorServices/cp_layer_renderer_configuration_error_code)

### Articles

[CompositorServices Functions](/documentation/CompositorServices/compositorservices-functions)

[Controlling Metal rendering immersion level](/documentation/CompositorServices/controlling-metal-rendering-immersion-level)

Enable flexible immersive rendering by supporting progressive immersion when rendering your Metal content.

### Structures

[`struct TextureTopology`](/documentation/CompositorServices/TextureTopology)

A type that specifies the organization of one of the drawable’s textures.

### Variables

[`var CP_ARKIT_AVAILABLE: Bool`](/documentation/CompositorServices/CP_ARKIT_AVAILABLE)

### Type Aliases

[`typealias cp_drawable_array_t`](/documentation/CompositorServices/cp_drawable_array_t)

An opaque type that contains the drawable types and other information
you need to set up your render pipeline.

[`typealias cp_hover_effect_t`](/documentation/CompositorServices/cp_hover_effect_t)

An opaque type that describes a hover effect of the tracking area.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)