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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access