Fixed Function Pipeline

From OpenGL Wiki
Jump to: navigation, search

The term Fixed Function Pipeline commonly refers to the set of configurable processing state present in older versions of OpenGL that have since been replaced by Shaders of some sort. While the current OpenGL pipeline still retains non-programmable state, that is not typically what people are referring to when they say "fixed function".

The purpose of OpenGL is to expose features of the underlying graphics hardware to application developers. In the days before graphics hardware was programmable, such hardware exposed a different rendering pipeline based on user-provided configuration rather than user-provided programs.

The general OpenGL Rendering Pipeline was more or less the same then as it is for modern hardware. However, in place of the programmable stages were built-in math operations. The user would provide specific matrices and other configuration parameters. In this way, the user could get the system to do a number of useful things. But it lacked the flexibility of a fully configurable system.

For example, in place of the Fragment Shader was a complex set of configurations called the "texture environment". Each Texture bound to the rendering context was also associated with a texture environment. This environment defined which texture coordinates were used to access the texture, as well as what to do with the color fetched from that texture. A texture's environment was not Texture object state; it was context state associated with a texture unit.

Other configuration state existed for Vertex Processing. In this stage, transformation and lighting was fairly hard-coded and inflexible, only allowing for multiplication of specific attributes with specific, user-provided matrices. Hardware support for lighting only extended as far as the Blinn-Phong lighting model, computed per vertex and interpolated as a final light intensity. It did allow for some nifty tricks by allowing the user to specify matrices for transforming texture coordinates, as well as a simple distance fog model.


OpenGL 3.0 was the last revision of the specification which fully supported both fixed and programmable functionality. Even so, most hardware since the OpenGL 2.0 generation lacked the actual fixed-function hardware. Instead, fixed-function processes are emulated with shaders built by the system.

In OpenGL 3.2, the Core Profile lacks these fixed-function concepts. The compatibility profile keeps them around. However, most newer features of OpenGL cannot work with fixed function, even when it might seem theoretically possible for them to interact.

For example, Tessellation is defined in terms of shaders, so it makes sense for the fixed function pipeline to not be able to work with it. However, Array Textures theoretically only need an extra texture coordinate. But the compatibility profile does not allow them to be used without shaders.

Similarly, textures with non-normalized integer image formats cannot be used with fixed-function. This is primarily because the mathematics behind texture environment computations is fundamentally rooted in floating-point operations. There are many other features of modern OpenGL that don't work in the fixed function pipeline.