---
title: "CVOpenGLTextureCacheFlush(_:_:)"
framework: Core Video
role: symbol
role_heading: Function
platforms: [macOS 10.4+]
path: "corevideo/cvopengltexturecacheflush(_:_:)"
---

# CVOpenGLTextureCacheFlush(_:_:)

Performs internal housekeeping/recycling operations on the cache.

## Declaration

```swift
func CVOpenGLTextureCacheFlush(_ textureCache: CVOpenGLTextureCache, _ options: CVOptionFlags)
```

## Parameters

- `textureCache`: The texture cache object to flush.
- `options`: Currently unused, set to 0.

## Discussion

Discussion This call must be made periodically to give the texture cache a chance to make OpenGL calls on the OpenGL context used to create it in order to perform its required housekeeping operations.

## See Also

### Functions

- [CVOpenGLTextureCacheCreate(_:_:_:_:_:_:)](corevideo/cvopengltexturecachecreate(_:_:_:_:_:_:).md)
- [CVOpenGLTextureCacheCreateTextureFromImage(_:_:_:_:_:)](corevideo/cvopengltexturecachecreatetexturefromimage(_:_:_:_:_:).md)
- [CVOpenGLTextureCacheGetTypeID()](corevideo/cvopengltexturecachegettypeid().md)
