The Render Engine
There are several APIs for drawing in the iPhone SDK, each useful for
different purposes. Cocoa uses Objective-C and focuses on manipulating high-level GUI
objects such as UIImage
, UIColor
, and UIFont
. Quartz Core Graphics uses C and is great for drawing vector
graphics such as lines, gradients, and shading, and for rendering PDF
content. However, most games require a high-performance rendering API,
which is why OpenGL ES is available.
OpenGL ES is a very low-level API focused on 3D rendering, so we are going to have to build up some code to bridge the gap between what we want to do—draw 2D animated sprites—and what OpenGL ES can do: render textures onto 3D geometry.
Three-dimensional rendering concepts and code can become complicated and confusing very quickly, and this is not a book about OpenGL ES. For this chapter ...
Get iPhone Game Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.