Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Sprite sheets (or texture atlases) were briefly referenced in Chapter 8 when covering displaying text in an OpenGL environment. Figure 9–3 illustrates what a sprite sheet looks like when used for rendering text to the screen.
Figure 9–3. Sprite sheet for 24-point Copperplate
This particular image was created using a free tool called LabelAtlasCreator for the Mac, as opposed to the CBFG tool used in Chapter 8. Besides the image file, it will generate a handy XML file in Apple's plist format that contains all of the placement details that are easy to convert to texture space.
But don't stop at fonts, because sprite sheets can also be applied any time you have a family of likeminded images. Switching from one texture to another can cause a lot of unneeded overhead, whereas a sprite sheet acts as a form of texture batching, saving a lot of GPU time. Check out the OS X–compatible Zwoptex tool or TexturePacker, which is used for general-purpose images.