Jump To:
Each Sample Code project is buildable and executable source example of how to accomplish a task for a specific Apple technology. They show the correct sequence of calls and parameter data types to provide a generalized method for API use that developers can modify for their specific needs.

Document Descriptions
On Off
Display

Sort by
Title
Sorted by
Topic
Sort by
Date
CocoaSpeechSynthesisExample (HTML) (DMG) (ZIP)
Shows how to use the Carbon Speech Synthesis API from within a Mac OS X Cocoa application.
Games 2007-03-23
CubePuzzle (HTML) (DMG) (ZIP)
Models a Rubik's Cube using Cocoa and OpenGL
Games 2003-04-21
DrawSprocketTestOld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates basic implementations of DrawSprocket Functions.
Games 2003-10-14
GeekGameBoard (HTML) (DMG) (ZIP)
Shows how to use Core Animation for the user interface of a board or card game.
Games 2007-12-19
GetMACAddressSample (HTML) (DMG) (ZIP)
Demonstrates how to retrieve the MAC address for each Ethernet interface from the Mac OS X I/O Registry.
Games 2003-01-14
GetPrimaryMACAddress (HTML) (DMG) (ZIP)
Demonstrates retrieving the MAC address of the built-in Ethernet controller. Useful for uniquely identifying a Macintosh system.
Games 2005-10-27
GetSetOptions (HTML) (DMG) (ZIP)
Demonstrates a variety of uses of Open Transport's option management routines.
Games 2003-01-14
GLSLShowpiece (HTML) (DMG) (ZIP)
GLSLShowpiece demonstrates several Vertex and Fragment shaders
Games 2006-07-17
GlyphaIVOld (HTML) (DMG) (ZIP)
Deprecated - A basic game implementation in the spirit of Joust meant as demonstation of Sprocket usage.
Games 2003-10-14
HID Calibrator (HTML) (DMG) (ZIP)
Human Interface Device Manager Calibrator sample
Games 2008-05-07
HID Config Save (HTML) (DMG) (ZIP)
Human Interface Device Manager Configuration sample
Games 2008-05-07
HID Explorer (HTML) (DMG) (ZIP)
Human Interface Device Manager Explorer
Games 2008-05-07
HID LED test tool (HTML) (DMG) (ZIP)
HID Manager sample project that shows how to set and clear keyboard LEDs.
Games 2008-07-25
HID Manager Basics (HTML) (DMG) (ZIP)
Shows basic use of HID Manager for Mac OS X: including device discovery, queues and polling elements.
Games 2003-07-10
HID Utilities Source (HTML) (DMG) (ZIP)
Shows a high level abstract library for the HID manager.
Games 2003-10-06
ImageClient (HTML) (DMG) (ZIP)
Demonstrates how to use CFNetwork for synchronous and asynchronous operations, network diagnostics, proxy navigation, and authentication.
Games 2005-06-01
InstallerPluginSample (HTML) (DMG) (ZIP)
Provides instructions for extending software installation using custom plugins
Games 2006-08-30
ListMania (HTML) (DMG) (ZIP)
Demonstrates a variety of techniques for using Open Transport's list utility routines.
Games 2003-01-14
MassiveImage (HTML) (DMG) (ZIP)
Shows how to use a CGDataProvider to save a very large image with Image IO
Games 2007-09-27
Mode (HTML) (DMG) (ZIP)
Shows how to enumerate displays and list the available modes for each display.
Games 2003-01-14
ModeWhacker (HTML) (DMG) (ZIP)
Shows how to enumerate, select, capture, manipulate, and release displays using the CGDirectDisplay API.
Games 2003-01-14
NoCopyReceives (HTML) (DMG) (ZIP)
Demonstrates using no-copy receives under Open Transport.
Games 2003-01-14
NSGLImage (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to texture in OpenGL with an NSImage and/or NSBitmapImageRep
Games 2004-12-01
OpenALExample (HTML) (DMG) (ZIP)
Basic example showing OpenAL usage in a 2D OpenGL environment
Games 2005-06-01
OpenGL Filter Basics Cocoa (HTML) (DMG) (ZIP)
How to use Objective-C and MVC design patterns in installing and utilizing filters in an OpenGL rendering pipeline
Games 2008-02-06
Out of This GWorld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates the use of offscreen GWorlds and palette animation to simulate animation.
Games 2003-03-12
Quartz Composer Texture (HTML) (DMG) (ZIP)
Shows how to use a Quartz Composer composition as an OpenGL texture.
Games 2005-06-01
RecordAudioToFile (HTML) (DMG) (ZIP)
Demonstrates recording audio to an AAC file using Core Audio
Games 2007-02-27
SetMouseAcclSample (HTML) (DMG) (ZIP)
Find HID System Manager and get/set cursor acceleration
Games 2006-11-28
Simple DrawSprocket (HTML) (DMG) (ZIP)
Deprecated - Simple use of DrawSprocket to set screen resolution and size.
Games 2003-07-22
SimplePing (HTML) (DMG) (ZIP)
Sample provides simple API to programatically ping a remote host without admin privileges
Games 2003-10-27
SimplePlayThru (HTML) (DMG) (ZIP)
Use the HAL's Audio Output Unit (AUHAL) for device input and output on a single device (play-thru)
Games 2006-10-25
SimpleSpeechRecExample (HTML) (DMG) (ZIP)
Demonstrates how to use the Speech Recognition Manager in a simple application.
Games 2003-03-26
TexturePerformanceDemo (HTML) (DMG) (ZIP)
OpenGL texture optimization demo for WWDC Session 214
Games 2005-06-01
VertexPerformanceDemo (HTML) (DMG) (ZIP)
Vertex optimization demo for WWDC Session 214
Games 2005-06-01
VideoHardwareInfo (HTML) (DMG) (ZIP)
Query VRAM, Quartz Extreme support, OpenGL extensions and renderer, GLSL version and support.
Games 2007-05-14
aglClipBufferRect (HTML) (DMG) (ZIP)
Shows the use of clip regions and buffer rects in AGL.
Graphics & Imaging 2003-01-14
AGLSurfaceTexture (HTML) (DMG) (ZIP)
Example of render to texture/texture from surface using aglSurfaceTexture.
Graphics & Imaging 2003-07-07
BasicCocoaAnimations (HTML) (DMG) (ZIP)
"BasicCocoaAnimations" demonstrates the use of the animator proxy to easily animate Cocoa views and windows.
Graphics & Imaging 2007-06-11
BlitNoVBL (HTML) (DMG) (ZIP)
Shows how to draw directly to the screen without syncing to the VBL of the monitor.
Graphics & Imaging 2003-01-14
BlitVBL (HTML) (DMG) (ZIP)
Shows how to have Mac OS X try its best to sync to the VBL for you.
Graphics & Imaging 2003-01-14
BoingX (HTML) (DMG) (ZIP)
Shows off using Quartz Extreme to provide borderless OpenGL content on the desktop.
Graphics & Imaging 2007-11-06
CALayerEssentials (HTML) (DMG) (ZIP)
Demonstrates the basics of setting up various Core Animation layers
Graphics & Imaging 2008-09-30
Carbon GLSnapshot (HTML) (DMG) (ZIP)
Demonstrates the use of OpenGL with Quicktime to capture OpenGL content.
Graphics & Imaging 2003-07-07
CarbonCocoaCoreImageTab (HTML) (DMG) (ZIP)
Carbon-based application creates a Cocoa-based web window which used CoreImage filters to transition between tabbed WebViews
Graphics & Imaging 2006-07-25
CarbonQuartzComposer_TV (HTML) (DMG) (ZIP)
Demonstrates how to integrate Cocoa based QuartzComposer window into a Carbon based application
Graphics & Imaging 2006-10-02
CarbonQuartzDrawingWPrinting (HTML) (DMG) (ZIP)
Deprecated - Demonstrates mixing QuickDraw and Quartz 2D drawing both on screen and during printing.
Graphics & Imaging 2003-01-14
CarbonSketch (HTML) (DMG) (ZIP)
Core Graphics only example of a Sketch application implemented with HIToolbox. Shows 1x1-CGBitmapContext for hit-testing, printing.
Graphics & Imaging 2005-03-23
CGDrawPicture (HTML) (DMG) (ZIP)
Deprecated - Shows how to use the QDPictDrawToCGContext API.
Graphics & Imaging 2003-01-14
CGGamma (HTML) (DMG) (ZIP)
Shows how to use CGDirectDisplay calls to manipulate display gamma tables.
Graphics & Imaging 2003-01-14
CIAnnotation (HTML) (DMG) (ZIP)
Image annotation application using Core Image Filters. Demonstrates creation and usage of Image Units.
Graphics & Imaging 2005-08-01
CIColorTracking (HTML) (DMG) (ZIP)
An Objective-C applicaton that implements a GPU-based technique to find the location of a uniquely colored object in a scene
Graphics & Imaging 2008-04-24
CITransitionSelectorSample2 (HTML) (DMG) (ZIP)
Showing all available Core Image transitions in a scrollable NSOpenGLView
Graphics & Imaging 2006-09-18
CIVideoDemoGL (HTML) (DMG) (ZIP)
CIVideoDemoGL demonstrates using Core Image with QuickTime and Core Video
Graphics & Imaging 2007-10-03
Cocoa CG aliasing demo (HTML) (DMG) (ZIP)
Shows how to draw both aliased and anti-aliased text and graphics using Quartz and Cocoa.
Graphics & Imaging 2003-07-17
Cocoa CG arc demo (HTML) (DMG) (ZIP)
Shows how to draw both aliased and anti-aliased arcs using Quartz and Cocoa.
Graphics & Imaging 2003-07-17
Cocoa OpenGL (HTML) (DMG) (ZIP)
Demonstrates using Cocoa with OpenGL, including window setup and event handling.
Graphics & Imaging 2007-10-22
Cocoa PDE with Carbon Printing (HTML) (DMG) (ZIP)
Application that uses a Cocoa PDE along with the Carbon Printing APIs.
Graphics & Imaging 2007-07-27
CocoaDVDPlayer (HTML) (DMG) (ZIP)
Demonstrates how to use DVD Playback Services to play DVD-Video media.
Graphics & Imaging 2005-11-04
CocoaSlides (HTML) (DMG) (ZIP)
An image browser written using AppKit's Core Animation-based compositing and animation functionality
Graphics & Imaging 2007-11-02
CollectPictColors (HTML) (DMG) (ZIP)
Deprecated - Uses Picture Utilities package and KnowsPict application to demonstrate collecting colors used by Pict resources.
Graphics & Imaging 2003-10-10
ColorBars (HTML) (DMG) (ZIP)
Shows how to enumerate, select, capture, manipulate, draw to, and release displays using the CGDirectDisplay API.
Graphics & Imaging 2003-01-14
ColorMatching (HTML) (DMG) (ZIP)
Performs simple color matching of images using ColorSync or the QuickTime 6.4 Graphics Importers.
Graphics & Imaging 2003-12-18
ColorSyncDevices (HTML) (DMG) (ZIP)
Demonstrates how to use the new ColorSync Device Support APIs introduced with Mac OS X.
Graphics & Imaging 2003-01-14
Core Animation QuickTime Layer (HTML) (DMG) (ZIP)
Shows the use of controls in a Layer over a Core Animation QTMovieLayer
Graphics & Imaging 2007-09-26
CoreImageGLTextureFBO (HTML) (DMG) (ZIP)
Making OpenGL textures with Core Image
Graphics & Imaging 2008-07-30
CTMClip (HTML) (DMG) (ZIP)
Deprecated - Shows how to manipulate the Quartz 2D Current Transform Matrix (CTM) for image drawing with clipping.
Graphics & Imaging 2003-01-14
CTMDemo (HTML) (DMG) (ZIP)
Deprecated - Shows how to manipulate the Quartz 2D Current Transform Matrix (CTM) for image drawing without clipping.
Graphics & Imaging 2003-01-14
CubePuzzle (HTML) (DMG) (ZIP)
Models a Rubik's Cube using Cocoa and OpenGL
Graphics & Imaging 2003-04-21
Draw Pixels (HTML) (DMG) (ZIP)
An example of the correct use of DrawPixels.
Graphics & Imaging 2003-07-16
FBOBunnies (HTML) (DMG) (ZIP)
Demonstrates how to use framebuffer objects (FBO)
Graphics & Imaging 2006-09-18
Fractal Performance (HTML) (DMG) (ZIP)
Three fractal applications that show various bottlenecks and how they can be fixed.
Graphics & Imaging 2006-04-17
FullScreen (HTML) (DMG) (ZIP)
Shows how to use BeginFullScreen and EndFullScreen to enter and exit full-screen mode.
Graphics & Imaging 2003-01-14
GeekGameBoard (HTML) (DMG) (ZIP)
Shows how to use Core Animation for the user interface of a board or card game.
Graphics & Imaging 2007-12-19
GLCarbon1ContextPbuffer (HTML) (DMG) (ZIP)
Demostrates using OpenGL pixel buffers with a single shared context.
Graphics & Imaging 2004-03-26
GLCarbonSharedPbuffer (HTML) (DMG) (ZIP)
Demostrates sharing a single OpenGL pixel buffer with multiple other contexts.
Graphics & Imaging 2004-03-26
GLChildWindowDemo (HTML) (DMG) (ZIP)
Shows using Cocoa's child windows and Quartz Extreme to provide 2D/3D overlays above 3D content.
Graphics & Imaging 2003-04-21
GLSL Basics Cocoa (HTML) (DMG) (ZIP)
GLSL fundamentals using NSOpenGLView
Graphics & Imaging 2008-07-30
GLSL Showpiece Lite (HTML) (DMG) (ZIP)
Using GLSL from a Cocoa application
Graphics & Imaging 2007-11-05
GLSLShowpiece (HTML) (DMG) (ZIP)
GLSLShowpiece demonstrates several Vertex and Fragment shaders
Graphics & Imaging 2006-07-17
GLUT (HTML) (DMG) (ZIP)
The OpenGL Utility Toolkit (GLUT) for Mac OS X version 3.4.0 (supporting the GLUT 3.7 API)
Graphics & Imaging 2008-02-08
GLUTBasics (HTML) (DMG) (ZIP)
Simple GLUT example which can be used as starter code.
Graphics & Imaging 2004-03-26
GLUTStereo (HTML) (DMG) (ZIP)
Shows how to use stereo with GLUT under Mac OS X v10.2.3 or later.
Graphics & Imaging 2003-02-20
GLUTSurfaceTexture (HTML) (DMG) (ZIP)
Example of using the new glutSurfaceTexture.
Graphics & Imaging 2004-03-26
Grady (HTML) (DMG) (ZIP)
Demonstrates how to use the NSGradient class.
Graphics & Imaging 2007-02-28
icon cache demo (HTML) (DMG) (ZIP)
Demonstrates the use of an icon cache to limit the search for icon resource to one resource file.
Graphics & Imaging 2003-01-30
IKSlideshowDemo (HTML) (DMG) (ZIP)
This small sample project shows how to use the ImageKit Slideshow to display images or PDFs.
Graphics & Imaging 2006-08-01
Image Difference (HTML) (DMG) (ZIP)
Demonstrates a way to use Quartz's compositing capability to find the difference between two images.
Graphics & Imaging 2003-01-30
Image Kit with Core Data (HTML) (DMG) (ZIP)
Using Image Kit's browser view with Core Data content.
Graphics & Imaging 2008-07-25
ImageApp (HTML) (DMG) (ZIP)
Demonstrates basic image handling using the ImageIO APIs in Mac OS X 10.4 Tiger
Graphics & Imaging 2008-01-24
ImageBackground (HTML) (DMG) (ZIP)
Shows how to draw an image in the background of an NSOutlineView and NSTableView.
Graphics & Imaging 2006-10-02
ImageBrowser (HTML) (DMG) (ZIP)
Demonstrates the ImageKit's IKImageBrowserView to browse images in a basic Cocoa application.
Graphics & Imaging 2007-03-13
JustDraw (HTML) (DMG) (ZIP)
Sample code being used in the WWDC 2005 Hands-On session 215 "Moving from QD to Quartz"
Graphics & Imaging 2005-06-01
LayerBackedOpenGLView (HTML) (DMG) (ZIP)
"LayerBackedOpenGLView" provides a simple example of hosting Cocoa controls as subviews of an NSOpenGLView.
Graphics & Imaging 2007-06-12
Link Snoop (HTML) (DMG) (ZIP)
Shows how to use PDFKit to scan for and highlight link annotations in PDFs.
Graphics & Imaging 2005-06-01
LiveVideoMixer (HTML) (DMG) (ZIP)
LiveVideoMixer demonstrates customized video rendering with QuickTime 7 and CoreVideo and OpenGL.
Graphics & Imaging 2008-04-24
LiveVideoMixer2 (HTML) (DMG) (ZIP)
An updated LiveVideoMixer with DV out over FireWire
Graphics & Imaging 2006-05-05
LiveVideoMixer3 (HTML) (DMG) (ZIP)
LiveVideoMixer3 is extended to support Video In via QTKit
Graphics & Imaging 2006-08-01
MassiveImage (HTML) (DMG) (ZIP)
Shows how to use a CGDataProvider to save a very large image with Image IO
Graphics & Imaging 2007-09-27
Mode (HTML) (DMG) (ZIP)
Shows how to enumerate displays and list the available modes for each display.
Graphics & Imaging 2003-01-14