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