Chapter 10
OpenGL ES: Going 3D
Super Jumper worked out rather well with the 2D OpenGL ES rendering engine. Now it's time to go full 3D. You've already worked in a 3D space when you defined your view frustum and the vertices of your sprites. In the latter case, the z-coordinate of each vertex was simply set to zero by default. The difference from 2D rendering really isn't all that big:
- Vertices not only have x- and y-coordinates, but they also have a z-coordinate.
- Instead of an orthographic projection, a perspective projection is used. Objects further away from the camera will appear smaller.
- Transformations, such as rotations, translations, and scales, have more degrees of freedom in 3D. Instead of just moving the vertices in the x-y plane, ...
Get Beginning Android 4 Games 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.