Before drawing, a Z or depth buffer containing as many pixels as the output buffer is assigned and initialized. The Z buffer is like a height field facing the camera and tracks which part of the scene geometry is closest to the camera, making it easier to remove hidden areas. The Z buffer can store additional attributes per pixel or assign other buffers to achieve this goal. As long as the primitives are not arranged in the order of back-to-front painting and have no pathological depth problems, a Z buffer is mandatory.
For each primitive, it either consists of an easy-to-draw part or can be split into such parts. Triangles or polygons that fit into screen pixels are called micropolygons and represent the smallest size a polygon needs to draw.