Chapter 4. The OpenGL Programmable PipelineWith 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 in the following ways.
All the built-in identifiers begin with the reserved prefix "gl_" to set them apart. |