iPhone OS Reference Library Apple Developer Connection spyglass button

Version: 1.1

Posted: 2009-10-09

Build Requirements: iPhone SDK 3.1 and later

Runtime Requirements: iPhone OS 3.1 and later

View Source Code:

Download Sample Code (“GLTextureAtlas.zip”, 420.7K)



Description

This sample demonstrates how to use a texture atlas to draw multiple objects with different textures simultaneously using OpenGL ES. The application uses a texture atlas in the PVR format. By adding in degenerated triangles, and compute 3D transformations ourselves using matrices, we are able to collapse all the draw calls into one.

Document Revision History

Date Notes
2009-10-09Updated for iPhone OS 3.1. Use CADisplayLink as the preferred method for controlling animation timing, and fall back to NSTimer when running on a pre 3.1 device where CADisplayLink is not available.
2009-06-29Demonstrates how to use a texture atlas to draw multiple objects with different textures simultaneously.
Did this document help you? Yes It's good, but... Not helpful...