In d3d, there are three buffer types for Windows: Color buffer, depth buffer, and stencel buffer.
- In d3d, color buffer is also called the render target, which indicates the final target buffer. It is used to store the color value of each pixel in the rendering window, that is, the actual color image.
- The depth buffer, also known as the Z buffer in d3d, is used to store data that determines the order before and after pixel.
- In d3d, stencel buffer is used to regulate the operation scope of color buffer. The common stencel buffer is used in racing games. When the picture of a racing game is taken outside the cab, the main change picture is the outside view, and the driving room is not changed much. To save computing time, you can use the stencel buffer to pre-define the range of the driving room. When color buffer is colored, it will refer to the stencel buffer to only change the image outside the cab.