<!--
{
  "availability" : [
    "macOS: -",
    "visionOS: 1.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CompositorServices",
  "identifier" : "/documentation/CompositorServices/cp_frame_query_drawable",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Compositor Services"
    ],
    "preciseIdentifier" : "c:@F@cp_frame_query_drawable"
  },
  "title" : "cp_frame_query_drawable"
}
-->

# cp_frame_query_drawable

Returns the drawable type you use to retrieve the textures
and drawing environment for the frame.

```
cp_drawable_tcp_frame_query_drawable(cp_frame_t frame);
```

## Parameters

`frame`

The frame to query.

## Return Value

The drawable type, or `nil` if the layer is in the
[`LayerRenderer.State.paused`](/documentation/CompositorServices/LayerRenderer/State-swift.enum/paused) or [`LayerRenderer.State.invalidated`](/documentation/CompositorServices/LayerRenderer/State-swift.enum/invalidated) state.

## Discussion

Fetch the drawable when you’re ready to encode the drawing commands for the frame.
The [`cp_drawable_t`](/documentation/CompositorServices/cp_drawable_t) type contains the textures and other information you need
to set up your render descriptor in Metal.

---

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)