Chapter 3

Building a 3D World

In the first two chapters, we covered the cool stuff and the math stuff (which could be either cool or boring). We went over Xcode’s OpenGL ES 2 template just to give you a taste of the structure and design principles of a “simple” OpenGL app. Here in Chapter 3, we’ll take a step back, examine a very simple 2D application at first, and then migrate it one step at a time to 3D. (4D hypercubes are beyond the scope of this work.) And during the process, more 3D theory about projections, rotations, and the like will be slipped in for good measure.

A Little More Theory

Remember that OpenGL ES objects are a collection of points in 3D space; that is, their location is defined by three values. These values are joined together ...

Get Pro OpenGL ES for iOS 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.