void zBuffer(void) { int x,y; for(y=0;yReadZ(x,y){ /* New point is not farther */ WriteZ(x,y,pz); WritePixel(x,y,polygon's color at pixel coords (x,y)) } } } } /* z-buffer */