O'Reilly logo

OpenGL ES 2 for Android by Kevin Brothaler

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 12Adding Terrain

Now that we have a nice backdrop with some stormy clouds on the horizon, it’s time for us to start adding in some substance to our world. In this chapter, we’ll learn how to use a height map to add some terrain to the scene. As we do this, we’ll touch many new areas of OpenGL and learn how to use the depth buffer for preventing overdraw, and we’ll also learn how to store vertex and index data directly on the GPU for better performance.

Height maps are an easy way to add terrain to a scene, and they can easily be generated or edited using a regular paint program. The depth buffer itself is a fundamental part of OpenGL, and it helps us easily render more complex scenes without worrying too much about how that scene is ...

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