<!--
{
  "documentType" : "article",
  "framework" : "CoreVideo",
  "identifier" : "/documentation/CoreVideo/cvopengltexturecache-780",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "CVOpenGLTextureCache"
}
-->

# CVOpenGLTextureCache

A cache used to create and manage OpenGL texture objects.

## Topics

### Functions

[`func CVOpenGLTextureCacheCreate(CFAllocator?, CFDictionary?, CGLContextObj, CGLPixelFormatObj, CFDictionary?, UnsafeMutablePointer<CVOpenGLTextureCache?>) -> CVReturn`](/documentation/CoreVideo/CVOpenGLTextureCacheCreate(_:_:_:_:_:_:))

Creates a new texture cache.

[`func CVOpenGLTextureCacheCreateTextureFromImage(CFAllocator?, CVOpenGLTextureCache, CVImageBuffer, CFDictionary?, UnsafeMutablePointer<CVOpenGLTexture?>) -> CVReturn`](/documentation/CoreVideo/CVOpenGLTextureCacheCreateTextureFromImage(_:_:_:_:_:))

Creates a CVOpenGLTexture object from an existing [CVImageBuffer](/documentation/CoreVideo/cvimagebuffer-q40).

[`func CVOpenGLTextureCacheFlush(CVOpenGLTextureCache, CVOptionFlags)`](/documentation/CoreVideo/CVOpenGLTextureCacheFlush(_:_:))

Performs internal housekeeping/recycling operations on the cache.

[`extern CVOpenGLTextureCacheRefCVOpenGLTextureCacheRetain(CVOpenGLTextureCacheRef textureCache);`](/documentation/CoreVideo/CVOpenGLTextureCacheRetain)

Retains a texture cache object.

[`extern void CVOpenGLTextureCacheRelease(CVOpenGLTextureCacheRef textureCache);`](/documentation/CoreVideo/CVOpenGLTextureCacheRelease)

Releases a texture cache object.

[`func CVOpenGLTextureCacheGetTypeID() -> CFTypeID`](/documentation/CoreVideo/CVOpenGLTextureCacheGetTypeID())

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

### Data Types

[`class CVOpenGLTextureCache`](/documentation/CoreVideo/CVOpenGLTextureCache)

### Constants

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

Dictionary keys and values for use with the cacheAttributes parameter of [`CVOpenGLTextureCacheCreate(_:_:_:_:_:_:)`](/documentation/CoreVideo/CVOpenGLTextureCacheCreate(_:_:_:_:_:_:))



---

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)