The rendering pipeline is the entire process of OpenGL-rendered scenes and is the process of rendering the objects to the plane. OpenGL's rendering pipeline went through the traditional fixed pipeline (the steps in the rendering process are defined beforehand) to the current programmable way (using the shader implementation), which is mainly due to the development of the current graphics card, the new graphics card provides user-programmable capabilities. These column articles mainly describe all aspects of the OpenGL rendering pipeline, from fixed pipelines to programmable pipeline differences, although the fixed pipeline is currently identified as deprecated, but it is valuable in terms of learning, let us better understand how graphics experts design this process. Through the process of rendering pipeline learning, while introducing some theoretical knowledge in the learning process and the API involved. As you learn about these things, try using a soft way to simulate the rendering process.
This article is the beginning of this series of articles, the main simple introduction of the process of rendering pipelines.
The process for fixing pipeline OpenGL fixed pipelines is shown in the following figure:
The above illustration only describes the processing of vertex data, and a detailed description of the processing of data for vertex types. In fact OpenGL also provides the processing of pixel-based data, combining these two types of data, a description of the fixed pipeline is shown in the following figure:
programmable pipeline programmable pipeline compared to fixed pipelines, the fixed pipeline part of the content can be implemented in a programmatic way, relatively flexible. As shown in the following illustration:
You can see that there are no changes to the subject, but the geometric and illumination calculations in the fixed pipeline are replaced by the vertexshader (vertex shader), the texture mapping in the fixed pipeline, the fog effect is replaced by the Fragmentshader (element Shaser). Given the processing of pixel-based data, the detailed programmable pipeline diagram is as follows: