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

# CVOpenGLTexture

A texture-based image buffer that supplies source image data to OpenGL.

## Discussion

Core Video OpenGL textures are texture-based image buffers used for supplying source image data to OpenGL.

## Topics

### Inspecting Textures

[`func CVOpenGLTextureGetName(CVOpenGLTexture) -> GLuint`](/documentation/CoreVideo/CVOpenGLTextureGetName(_:))

Returns the texture target name of a CoreVideo OpenGL texture.

[`func CVOpenGLTextureGetTarget(CVOpenGLTexture) -> GLenum`](/documentation/CoreVideo/CVOpenGLTextureGetTarget(_:))

Returns the texture target (for example, `GL_TEXTURE_2D`) of an OpenGL texture.

[`func CVOpenGLTextureGetCleanTexCoords(CVOpenGLTexture, UnsafeMutablePointer<GLfloat>, UnsafeMutablePointer<GLfloat>, UnsafeMutablePointer<GLfloat>, UnsafeMutablePointer<GLfloat>)`](/documentation/CoreVideo/CVOpenGLTextureGetCleanTexCoords(_:_:_:_:_:))

Returns the texture coordinates for the part of the image that should be displayed.

[`func CVOpenGLTextureIsFlipped(CVOpenGLTexture) -> Bool`](/documentation/CoreVideo/CVOpenGLTextureIsFlipped(_:))

Determines whether an OpenGL texture is flipped vertically.

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

Obtains the Core Foundation ID for the Core Video OpenGL texture type.

### Retaining and Releasing Textures

[`extern CVOpenGLTextureRefCVOpenGLTextureRetain(CVOpenGLTextureRef texture);`](/documentation/CoreVideo/CVOpenGLTextureRetain)

Retains a Core Video OpenGL texture.

[`extern void CVOpenGLTextureRelease(CVOpenGLTextureRef texture);`](/documentation/CoreVideo/CVOpenGLTextureRelease)

Releases a Core Video OpenGL texture.

### Data Types

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

A reference to an OpenGL texture-based image buffer object.



---

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)