Chapter 4. The OpenGL Programmable Pipeline

With contributions by Barthold Lichtenbelt

The OpenGL Shading Language is designed specifically for use with OpenGL. Vertex shader and fragment shader input and output are tied into the standard OpenGL pipeline in a well-defined manner. The basics of how the programmable processors fit into the OpenGL pipeline were covered in Section 2.3. This chapter discusses the details of that integration and the language mechanisms used to achieve it.

Applications can provide data to shaders with user-defined attribute variables and user-defined uniform variables. The OpenGL Shading Language also provides built-in variables that can communicate between the programmable processors and the surrounding fixed functionality ...

Get OpenGL® Shading Language, Second 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.