Version: 1.0

Posted: 2008-06-06

Build Requirements: Xcode 3.x

Runtime Requirements: Leopard 10.5.x

View Source Code:

Download Sample (“”, 969.8K)
Download Sample (“QTCoreVideo103.dmg”, 964.0K)


QTCoreVideo103 is a Cocoa sample demonstrating how to render a QuickTime Movie using OpenGL texture range and the Core Video pixel buffer pipeline.

This sample is the second in a series of samples demonstrating the synergy between QTKit, CoreVideo, and OpenGL. QTCoreVideo103 makes use of the classes introduced in QTCoreVideo102 and adds the OpenGL texture range framework.

The techniques introduced are suited for applications that require direct access to the video pixel buffer.

Base Classes:

• OpenGLViewKit - Allows you to work with OpenGLViews, interact with objects in 3D space.

• QTCoreVideoController - Request broker between the OpenGL models and the OpenGL views.

• MemObject - Memory container class.

• AlertPanelKit - Utility class for displaying alerts.

Derived Classes:

• QTCoreVideoOpenGLView - Derived from OpenGLViewKit, concrete view class.

• QTVisualContextKit - Utility class for maintaining Core Video PixelBuffer and Core Video OpenGL textures.

• OpenGLTextureRangeKit - Utility class to manage VRAM or AGP textures.

• OpenGLQuad - Allows you to instantiate a Quad object as a display list.

• OpenGLTeapot - Allows you to instantiate a Teapot object as a display list.

• OpenGLTeapotTextured - Derived from OpenGLTeapot maintains a texture associated with a Teapot surface.

There are several extensions one can use to eliminate one or more data copies and control how texture data travels from your application to the GPU. Here we shall use GL_APPLE_texture_range along with a storage hint with either GL_STORAGE_CACHED_APPLE or GL_STORAGE_SHARED_APPLE for VRAM or AGP texturing respectively. Adopting Core Video pixel buffer pipeline, with OpenGL VRAM or AGP texturing, is the simplest means by which applications can gain direct access to, and manipulate the video pixel buffer.

This sample is part of the QTCoreVideo group of samples. Also see QTCoreVideo101, QTCoreVideo102, QTCoreVideo201, QTCoreVideo202, and QTCoreVideo301.

Document Revision History

Date Notes
2008-06-06Demonstrates how to render a QuickTime Movie using OpenGL texture range and the Core Video pixel buffer pipeline.

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.