glReadPixels

I know that the function,glReadPixels(),

can extract the depth value from Z-buffer.

Then where does glReadPixels() extract the depth value in a pixel.

I think glReadPixels() extracts the

depth value from the pixel’s center point.

Is it right?

If you want the depth at (100, 100), you will get the value in the depthbuffer in position (100,100). This means the depth for the whole pixel, not just the center, but all the way out to the pixels edges.