A Review

In this chapter, we learned how to load in a height map from a file and convert it into a form that OpenGL can draw using vertex buffer objects and index buffer objects. Height maps can be a great way of representing terrain, but because they are based off of two-dimensional maps, they cannot easily represent “holes” in the terrain, such as caves or arches. Height maps also have fixed resolution in all dimensions that is based on the source image’s width, height, and precision per pixel.

We also covered depth testing and culling, two techniques that make it a lot easier for us to render objects properly and increase performance at the same time. When we created the skybox shader back in Adding a Skybox Shader Program, we mentioned ...

Get OpenGL ES 2 for Android 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.