Jump To:
Sample Code
Mac OS X offers game developers state-of-the-art audio, 2D and 3D graphics, networking capabilities, and human interface features. With OpenGL, Quartz, Velocity Engine, and the Mac OS X development tools and frameworks, Apple provides developers with everything they need to build or port exciting and compelling games.

A guided introduction and learning path to developing games for Mac OS X.   C and Objective-C API references organized by framework.
Document Descriptions
On Off

Sort by
Sort by
Sorted by
CFPrefTopScores (HTML) (DMG) (ZIP)
How to access globally shared (writable) user preferences without requiring authentication.
Carbon, Files & Software Installation, Porting 2006-10-09
BoingX (HTML) (DMG) (ZIP)
Shows off using Quartz Extreme to provide borderless OpenGL content on the desktop.
Graphics & Imaging 2006-10-02
InstallerPluginSample (HTML) (DMG) (ZIP)
Provides instructions for extending software installation using custom plugins
Files & Software Installation 2006-08-30
RecordAudioToFile (HTML) (DMG) (ZIP)
Demonstrates recording audio to an AAC file using Core Audio
Audio 2006-07-25
GLSLShowpiece (HTML) (DMG) (ZIP)
GLSLShowpiece demonstrates several Vertex and Fragment shaders
Graphics & Imaging 2006-07-17
GetPrimaryMACAddress (HTML) (DMG) (ZIP)
Demonstrates retrieving the MAC address of the built-in Ethernet controller. Useful for uniquely identifying a Macintosh system.
Networking 2005-10-27
ImageClient (HTML) (DMG) (ZIP)
Demonstrates how to use CFNetwork for synchronous and asynchronous operations, network diagnostics, proxy navigation, and authentication.
Networking 2005-06-01
OpenALExample (HTML) (DMG) (ZIP)
Basic example showing OpenAL usage in a 2D OpenGL environment
Audio, Cocoa 2005-06-01
Quartz Composer Texture (HTML) (DMG) (ZIP)
Shows how to use a Quartz Composer composition as an OpenGL texture.
Graphics & Imaging 2005-06-01
TexturePerformanceDemo (HTML) (DMG) (ZIP)
OpenGL texture optimization demo for WWDC Session 214
Graphics & Imaging 2005-06-01
VertexPerformanceDemo (HTML) (DMG) (ZIP)
Vertex optimization demo for WWDC Session 214
Cocoa, Graphics & Imaging 2005-06-01
Demonstrates how to texture in OpenGL with an NSImage and/or NSBitmapImageRep
Cocoa, Graphics & Imaging 2004-12-01
VideoHardwareInfo (HTML) (DMG) (ZIP)
Retrieves information about video hardware using IOKit and Core Graphics
Cocoa, Graphics & Imaging 2004-10-29
SimplePlayThru (HTML) (DMG) (ZIP)
Use the HAL's Audio Output Unit (AUHAL) for device input and output on a single device (play-thru)
Audio 2004-07-09
Cocoa OpenGL (HTML) (DMG) (ZIP)
Demonstrates using Cocoa with OpenGL, including window setup and event handling.
Cocoa 2003-10-27
Custom Cocoa OpenGL (HTML) (DMG) (ZIP)
Usable as a starting point for Cocoa OpenGL applications needing a custom version of NSOpenGLView.
Cocoa, Graphics & Imaging 2003-10-27
SimplePing (HTML) (DMG) (ZIP)
Sample provides simple API to programatically ping a remote host without admin privileges
Networking 2003-10-27
DrawSprocketTestOld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates basic implementations of DrawSprocket Functions.
Carbon, Graphics & Imaging 2003-10-14
GlyphaIVOld (HTML) (DMG) (ZIP)
Deprecated - A basic game implementation in the spirit of Joust meant as demonstation of Sprocket usage.
Carbon, Graphics & Imaging 2003-10-14
HID Utilities Source (HTML) (DMG) (ZIP)
Shows a high level abstract library for the HID manager.
Human Interface Device & Force Feedback 2003-10-06
Simple DrawSprocket (HTML) (DMG) (ZIP)
Deprecated - Simple use of DrawSprocket to set screen resolution and size.
Carbon, Graphics & Imaging 2003-07-22
HID Manager Basics (HTML) (DMG) (ZIP)
Shows basic use of HID Manager for Mac OS X: including device discovery, queues and polling elements.
Human Interface Device & Force Feedback 2003-07-10
AGLSurfaceTexture (HTML) (DMG) (ZIP)
Example of render to texture/texture from surface using aglSurfaceTexture.
Graphics & Imaging 2003-07-07
Carbon GLSnapshot (HTML) (DMG) (ZIP)
Demonstrates the use of OpenGL with Quicktime to capture OpenGL content.
Graphics & Imaging 2003-07-07
CocoaSpeechSynthesisExample (HTML) (DMG) (ZIP)
Shows how to use the Carbon Speech Synthesis API from within a Mac OS X Cocoa application.
Speech Technologies 2003-06-18
CubePuzzle (HTML) (DMG) (ZIP)
Models a Rubik's Cube using Cocoa and OpenGL
Cocoa 2003-04-21
SimpleSpeechRecExample (HTML) (DMG) (ZIP)
Demonstrates how to use the Speech Recognition Manager in a simple application.
Speech Technologies 2003-03-26
Out of This GWorld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates the use of offscreen GWorlds and palette animation to simulate animation.
Graphics & Imaging 2003-03-12
aglClipBufferRect (HTML) (DMG) (ZIP)
Shows the use of clip regions and buffer rects in AGL.
Graphics & Imaging 2003-01-14
Shows how to have Mac OS X try its best to sync to the VBL for you.
Performance 2003-01-14
CGGamma (HTML) (DMG) (ZIP)
Shows how to use CGDirectDisplay calls to manipulate display gamma tables.
Graphics & Imaging 2003-01-14
GetMACAddressSample (HTML) (DMG) (ZIP)
Demonstrates how to retrieve the MAC address for each Ethernet interface from the Mac OS X I/O Registry.
Networking 2003-01-14
GetSetOptions (HTML) (DMG) (ZIP)
Demonstrates a variety of uses of Open Transport's option management routines.
Networking 2003-01-14
Deprecated - Renamed "glut". Now found at <A HREF="/samplecode/glut/glut.html">glut sample</A>.
Graphics & Imaging 2003-01-14
HID Explorer (HTML) (DMG) (ZIP)
Illustrates a Carbon NIB sample that uses HID Utilities to explore HID devices and elements.
Human Interface Device & Force Feedback 2003-01-14
ListMania (HTML) (DMG) (ZIP)
Demonstrates a variety of techniques for using Open Transport's list utility routines.
Networking 2003-01-14
Mode (HTML) (DMG) (ZIP)
Shows how to enumerate displays and list the available modes for each display.
Graphics & Imaging 2003-01-14
Modeller (HTML) (DMG) (ZIP)
A Cocoa 3D modelling sample that uses Quake 2 models for data.
Cocoa 2003-01-14
ModeWhacker (HTML) (DMG) (ZIP)
Shows how to enumerate, select, capture, manipulate, and release displays using the CGDirectDisplay API.
Graphics & Imaging 2003-01-14
NoCopyReceives (HTML) (DMG) (ZIP)
Demonstrates using no-copy receives under Open Transport.
Networking 2003-01-14
OpenGL Movie (HTML) (DMG) (ZIP)
A demonstration of QuickTime and OpenGL integration and optimized texture mapping.
Carbon, Graphics & Imaging, QuickTime 2003-01-14
OTSimpleDownloadHTTP (HTML) (DMG) (ZIP)
Demonstrates the easiest way to use Open Transport to download an HTTP URL.
Networking 2003-01-14
Red Rocket (HTML) (DMG) (ZIP)
An example showing a simple sprite engine using OpenGL.
Carbon, Graphics & Imaging, Human Interface Device & Force Feedback 2003-01-14