Mac OS X Reference Library Apple Developer
Search

OpenGLScreenSnapshot

Last Revision:
Version 1.1, 2008-08-14
Code refactoring.
(Full Revision History)
Build Requirements:
Xcode 3.0
Runtime Requirements:
Mac OS X 10.5

OpenGLScreenSnapshot is a Mac OS X application which demonstrates how to use OpenGL to grab a "snapshot" of the screen and save it to a image file on disk. This sample uses the OpenGL glReadPixels function to get the pixel data for the screen. This technique is actually very simple to use, and is sufficient for grabbing a single or a very few frames.




Last updated: 2008-08-14

Did this document help you? Yes It's good, but... Not helpful...