---
title: "CVOpenGLESTextureCacheCreate(_:_:_:_:_:)"
framework: corevideo
role: symbol
role_heading: Function
path: "corevideo/cvopenglestexturecachecreate(_:_:_:_:_:)"
---

# CVOpenGLESTextureCacheCreate(_:_:_:_:_:)

Creates a new Core Video texture cache.

## Declaration

```swift
func CVOpenGLESTextureCacheCreate(_ allocator: CFAllocator?, _ cacheAttributes: CFDictionary?, _ eaglContext: CVEAGLContext, _ textureAttributes: CFDictionary?, _ cacheOut: UnsafeMutablePointer<CVOpenGLESTextureCache?>) -> CVReturn
```

## Parameters

- `allocator`: The doc://com.apple.documentation/documentation/CoreFoundation/CFAllocator to use for allocating the texture cache. This parameter can be NULL.
- `cacheAttributes`: A doc://com.apple.documentation/documentation/CoreFoundation/CFDictionary containing the attributes of the texture cache itself. This parameter can be NULL.
- `eaglContext`: The OpenGLES 2.0 context into which the texture objects will be created. OpenGLES 1.x contexts are not supported.
- `textureAttributes`: A doc://com.apple.documentation/documentation/CoreFoundation/CFDictionary containing the attributes to be used for creating the doc://com.apple.corevideo/documentation/CoreVideo/CVOpenGLESTexture objects. This parameter can be NULL.
- `cacheOut`: A pointer to a CVOpenGLESTextureCacheRef where the newly created texture cache will be placed.

## Return Value

Return Value Upon successful creation of the texture cache, this function returns kCVReturnSuccess.

## See Also

### Functions

- [CVOpenGLESTextureCacheCreateTextureFromImage(_:_:_:_:_:_:_:_:_:_:_:_:)](corevideo/cvopenglestexturecachecreatetexturefromimage(_:_:_:_:_:_:_:_:_:_:_:_:).md)
- [CVOpenGLESTextureCacheFlush(_:_:)](corevideo/cvopenglestexturecacheflush(_:_:).md)
- [CVOpenGLESTextureCacheGetTypeID()](corevideo/cvopenglestexturecachegettypeid().md)
