---
title: isFramebufferOnly
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtltexture/isframebufferonly
---

# isFramebufferOnly

A Boolean value that indicates whether the texture can only be used as a render target.

## Declaration

```swift
var isFramebufferOnly: Bool { get }
```

## Discussion

Discussion The default is false, which indicates the use of the texture is not restricted. If true, neither replace(region:mipmapLevel:slice:withBytes:bytesPerRow:bytesPerImage:) nor getBytes(_:bytesPerRow:bytesPerImage:from:mipmapLevel:slice:) can be used with this texture. Also, this texture can only be used as an attachment for MTLRenderPassDescriptor and cannot be a texture argument for MTLRenderCommandEncoder, MTLBlitCommandEncoder, or MTLComputeCommandEncoder. Textures you obtain from a CAMetalDrawable instance are only usable as attachments, depending on the value of framebufferOnly passed to their parent CAMetalLayer instance. These restrictions don’t apply to textures that your app creates directly.

## See Also

### Querying texture attributes

- [textureType](metal/mtltexture/texturetype.md)
- [pixelFormat](metal/mtltexture/pixelformat.md)
- [width](metal/mtltexture/width.md)
- [height](metal/mtltexture/height.md)
- [depth](metal/mtltexture/depth.md)
- [mipmapLevelCount](metal/mtltexture/mipmaplevelcount.md)
- [arrayLength](metal/mtltexture/arraylength.md)
- [sampleCount](metal/mtltexture/samplecount.md)
- [usage](metal/mtltexture/usage.md)
- [allowGPUOptimizedContents](metal/mtltexture/allowgpuoptimizedcontents.md)
- [isShareable](metal/mtltexture/isshareable.md)
- [swizzle](metal/mtltexture/swizzle.md)
- [MTLTextureType](metal/mtltexturetype.md)
- [MTLTextureUsage](metal/mtltextureusage.md)
