<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CAMetalLayer/framebufferOnly",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CAMetalLayer(py)framebufferOnly"
  },
  "title" : "framebufferOnly"
}
-->

# framebufferOnly

A Boolean value that determines whether the layer’s textures are used only for rendering.

```
var framebufferOnly: Bool { get set }
```

## Discussion

If the value is <doc://com.apple.documentation/documentation/Swift/true> (the default), the [`CAMetalLayer`](/documentation/QuartzCore/CAMetalLayer) class allocates its <doc://com.apple.documentation/documentation/Metal/MTLTexture> objects with only the <doc://com.apple.documentation/documentation/Metal/MTLTextureUsage/renderTarget> usage flag. Core Animation can then optimize the texture for display purposes. However, you may not sample, read from, or write to those textures. To support sampling and pixel read/write operations (at a cost to performance), set this value to <doc://com.apple.documentation/documentation/Swift/false>.

---

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)