opengl

let me know cleary what is the difference between SINGLE and DOUBLE buffering and the use of DEPTH

frame is displayed, the next frame is drawn in the front buffer. Then the back and front buffer are swaped. The frame that was drawn in the front buffer, is now on back buffer and can be displayed. The new next frame can be drawn in the front buffer. With this technik, we can eliminate the flicker on the screen.

If we want to draw an object that covers an other object, we don’t want to draw the part of this object that is covered. So we must use the Depth test. 2 pixels that have same x and y coords but different z coord(for example z1=-10 and z2=-2), only the pixel with z2 coord=-2 is drawn.