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

# CVOpenGLESTextureCache

A cache used to create and manage OpenGL ES texture objects.

## Discussion

Core Video uses OpenGL ES texture caches to cache and manage [`CVOpenGLESTexture`](/documentation/CoreVideo/CVOpenGLESTexture) textures. These texture caches provide you with a way to directly read and write buffers with various pixel formats, such as 420v or BGRA, from GL ES.

## Topics

### Functions

The functions in this section operate on Core Video texture caches derived from the `CVOpenGLESTextureCacheRef` type.

[`func CVOpenGLESTextureCacheCreate(CFAllocator?, CFDictionary?, CVEAGLContext, CFDictionary?, UnsafeMutablePointer<CVOpenGLESTextureCache?>) -> CVReturn`](/documentation/CoreVideo/CVOpenGLESTextureCacheCreate(_:_:_:_:_:))

Creates a new Core Video texture cache.

[`func CVOpenGLESTextureCacheCreateTextureFromImage(CFAllocator?, CVOpenGLESTextureCache, CVImageBuffer, CFDictionary?, GLenum, GLint, GLsizei, GLsizei, GLenum, GLenum, Int, UnsafeMutablePointer<CVOpenGLESTexture?>) -> CVReturn`](/documentation/CoreVideo/CVOpenGLESTextureCacheCreateTextureFromImage(_:_:_:_:_:_:_:_:_:_:_:_:))

Creates a [`CVOpenGLESTexture`](/documentation/CoreVideo/CVOpenGLESTexture) object from an existing [`CVImageBuffer`](/documentation/CoreVideo/CVImageBuffer).

[`func CVOpenGLESTextureCacheFlush(CVOpenGLESTextureCache, CVOptionFlags)`](/documentation/CoreVideo/CVOpenGLESTextureCacheFlush(_:_:))

Performs internal housekeeping/recycling operations on a texture cache.

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

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

### Data Types

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

[`typealias CVEAGLContext`](/documentation/CoreVideo/CVEAGLContext)

A type that resolves to an <doc://com.apple.documentation/documentation/OpenGLES/EAGLContext> pointer when appropriate.

### Constants

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

Attributes for the texture cache.



---

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)