Abstract
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, they can now be moved around freely on all 3 axes.
-
A camera is defined with an arbitrary position and orientation in 3D space.
-
The order in which you render the triangles of your objects is now important. Objects further away from the camera must be overlapped by objects that are closer to the camera.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2011 Mario Zechner and Robert Green
About this chapter
Cite this chapter
Zechner, M., Green, R. (2011). OpenGL ES: Going 3D. In: Beginning Android 4 Games Development. Apress. https://doi.org/10.1007/978-1-4302-3988-8_10
Download citation
DOI: https://doi.org/10.1007/978-1-4302-3988-8_10
Publisher Name: Apress
Print ISBN: 978-1-4302-3987-1
Online ISBN: 978-1-4302-3988-8
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books