CVOpenGLTexture Reference
| Derived from | |
| Framework | System/Library/Frameworks/QuartzCore.framework |
| Companion guide | |
| Declared in | CVOpenGLTexture.h |
Overview
In Core Video, you manipulate OpenGL textures using the CVOpenGLTexture opaque type. This type serves as a wrapper around the standard OpenGL texture type. An OpenGL texture is stored in video memory. You output OpenGL textures to the screen in response to the display link callback. For more information on the display link callback, see CVDisplayLinkOutputCallback.
Functions
CVOpenGLTextureGetCleanTexCoords
Returns the texture coordinates for the part of the image that should be displayed.
void CVOpenGLTextureGetCleanTexCoords ( CVOpenGLTextureRef image, GLfloat lowerLeft[2], GLfloat lowerRight[2], GLfloat upperRight[2], GLfloat upperLeft[2] );
Parameters
- image
The Core Video OpenGL texture whose clean tex coordinates you want to obtain.
- lowerLeft
On output, the
GLFloatarray holds the s and t texture coordinates of the lower-left corner of the image.- lowerRight
On output, the
GLFloatarray holds the s and t texture coordinates of the lower-right corner of the image.- upperRight
On output, the
GLFloatarray holds the s and t texture coordinates of the upper-right corner of the image.- upperLeft
On output, the
GLFloatarray holds the s and t texture coordinates of the upper-left corner of the image.
Discussion
This function automatically takes into account whether or not the texture is flipped.
Availability
- Available in OS X v10.4 and later.
Declared In
CVOpenGLTexture.hCVOpenGLTextureGetName
Returns the texture target name of a CoreVideo OpenGL texture.
GLuint CVOpenGLTextureGetName ( CVOpenGLTextureRef image );
Parameters
- image
The Core Video OpenGL texture whose texture target name you want to obtain.
Return Value
The target name of the texture.
Discussion
See the OpenGL specification for more information about texture targets.
Availability
- Available in OS X v10.4 and later.
Declared In
CVOpenGLTexture.hCVOpenGLTextureGetTarget
Returns the texture target (for example, GL_TEXTURE_2D) of an OpenGL texture.
GLenum CVOpenGLTextureGetTarget ( CVOpenGLTextureRef image );
Parameters
- image
The Core Video OpenGL texture whose target you want to obtain.
Return Value
The OpenGL texture target.
Discussion
See the OpenGL specification for more information about texture targets.
Availability
- Available in OS X v10.4 and later.
Declared In
CVOpenGLTexture.hCVOpenGLTextureGetTypeID
Obtains the Core Foundation ID for the Core Video OpenGL texture type.
CFTypeID CVOpenGLTextureGetTypeID ( void );
Return Value
The Core Foundation ID for this type.
Availability
- Available in OS X v10.4 and later.
Declared In
CVOpenGLTexture.hCVOpenGLTextureIsFlipped
Determines whether an OpenGL texture is flipped vertically.
Boolean CVOpenGLTextureIsFlipped ( CVOpenGLTextureRef image );
Parameters
- image
The Core Video OpenGL texture whose vertical orientation you want to determine.
Return Value
Returns true if (0,0) in the texture is in the upper-left corner, and false if (0,0) is in the lower-left corner.
Discussion
Quartz assumes a lower-left origin.
Availability
- Available in OS X v10.4 and later.
Declared In
CVOpenGLTexture.hCVOpenGLTextureRelease
Releases a Core Video OpenGL texture.
void CVOpenGLTextureRelease ( CVOpenGLTextureRef texture );
Parameters
- texture
The Core Video OpenGL texture that you want to release.
Discussion
This function is equivalent to CFRelease, but is NULL safe.
Availability
- Available in OS X v10.4 and later.
Declared In
CVOpenGLTexture.hCVOpenGLTextureRetain
Retains a Core Video OpenGL texture.
CVOpenGLTextureRef CVOpenGLTextureRetain ( 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.
Availability
- Available in OS X v10.4 and later.
Declared In
CVOpenGLTexture.hData Types
CVOpenGLTextureRef
A reference to an OpenGL texture-based image buffer object.
typedef CVImageBufferRef CVOpenGLTextureRef;
Discussion
The Core Video OpenGL texture is a wrapper around the standard OpenGL texture.
Availability
- Available in OS X v10.3 and later.
Declared In
CVOpenGLTexture.h© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-08-03)