Chapter 8. Primitive Processing

What You’ll Learn in This Chapter

• How to use tessellation to add geometric detail to your scenes

• How to use geometry shaders to process whole primitives and create geometry on the fly

In the previous chapters, you’ve read about the OpenGL pipeline and have been at least briefly introduced to the functions of each of its stages. We’ve covered the vertex shader stage in some detail, including how its inputs are formed and where its outputs go. A vertex shader runs once on each of the vertices you send OpenGL and produces one set of outputs for each. The next few stages of the pipeline seem similar to vertex shaders at first, but can actually be considered primitive processing stages. First, the two tessellation ...

Get OpenGL® SuperBible: Comprehensive Tutorial and Reference, Sixth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.