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 O’Reilly online learning.

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