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 ...
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