<!--
{
  "documentType" : "article",
  "framework" : "CoreVideo",
  "identifier" : "/documentation/CoreVideo/cvmetaltexturecache-q3j",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "CVMetalTextureCache"
}
-->

# CVMetalTextureCache

A cache used to create and manage Metal texture objects.

## Discussion

A Core Video Metal texture cache creates and manages [`CVMetalTexture`](/documentation/CoreVideo/CVMetalTexture) textures. You use a [CVMetalTextureCache](/documentation/CoreVideo/cvmetaltexturecache-q3j) object to directly read from or write to GPU-based Core Video image buffers in rendering, or for sharing data with Metal kernels. For example, you can use a Metal texture cache to present live output from a device’s camera in a 3D scene rendered with Metal.

## Topics

### Functions

[`CVMetalTextureCacheCreate(_:_:_:_:_:)`](/documentation/CoreVideo/CVMetalTextureCacheCreate(_:_:_:_:_:))

Creates a new texture cache.

[`CVMetalTextureCacheCreateTextureFromImage(_:_:_:_:_:_:_:_:_:)`](/documentation/CoreVideo/CVMetalTextureCacheCreateTextureFromImage(_:_:_:_:_:_:_:_:_:))

Creates a Core Video Metal texture buffer from an existing image buffer.

[`CVMetalTextureCacheFlush(_:_:)`](/documentation/CoreVideo/CVMetalTextureCacheFlush(_:_:))

Manually flushes the contents of the provided texture cache.

[`CVMetalTextureCacheGetTypeID()`](/documentation/CoreVideo/CVMetalTextureCacheGetTypeID())

Returns the Core Foundation type identifier for a Core Video Metal texture cache.

### Data Types

[`CVMetalTextureCache`](/documentation/CoreVideo/CVMetalTextureCache)

A reference to a Core Video Metal texture cache.

### Constants

[Cache Attributes](/documentation/CoreVideo/CVMetalTextureCache-cache-attributes)

Attributes specifying texture cache behavior, used with the [`CVMetalTextureCacheCreate(_:_:_:_:_:)`](/documentation/CoreVideo/CVMetalTextureCacheCreate(_:_:_:_:_:)) function.

### Related Documentation

  <doc://com.apple.documentation/documentation/Metal/setting-up-a-command-structure>



---

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)