<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.4.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreVideo",
  "identifier" : "/documentation/CoreVideo/CVOpenGLTextureRetain",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Video"
    ],
    "preciseIdentifier" : "c:@F@CVOpenGLTextureRetain"
  },
  "title" : "CVOpenGLTextureRetain"
}
-->

# CVOpenGLTextureRetain

Retains a Core Video OpenGL texture.

```
extern CVOpenGLTextureRefCVOpenGLTextureRetain(CVOpenGLTextureRef texture);
```

## Parameters

`texture`

The Core Video OpenGL texture that you want to retain.

## Return Value

For convenience, the Core Video OpenGL texture you want to retain.

## Discussion

This function is equivalent to `CFRetain`, but is `NULL` safe.

---

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)