O'Reilly logo

Pro OpenGL ES for Android by Mayank Verma, Mike Smithwick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3

From 2D to 3D: Adding One Extra Dimension

In the first two chapters, we covered the cool stuff and the math stuff (which could be either cool or boring). Here in Chapter 3 we'll move the bouncing cube example beyond a mere 2D version to a 3D version (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. However, note that OpenGL is not just for 3D but can easily be used to place 2D controls in front of your 3D visualization.

First, 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 to form faces, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required