<!--
{
  "availability" : [
    "visionOS: 1.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CompositorServices",
  "identifier" : "/documentation/CompositorServices/LayerRenderer/Frame/queryDrawable()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Compositor Services",
      "CompositorServices"
    ],
    "preciseIdentifier" : "s:So10cp_frame_tV18CompositorServicesE13queryDrawableSo0A11_drawable_tVSgyF"
  },
  "title" : "queryDrawable()"
}
-->

# queryDrawable()

Retrieves the frame’s drawable, which contains the textures and drawing environment for the frame.

```
func queryDrawable() -> LayerRenderer.Drawable?
```

## 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 [`LayerRenderer.Drawable`](/documentation/CompositorServices/LayerRenderer/Drawable) 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)