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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access