Parameters x , y Specify the window coordinates of the first pixel that is read from the frame buffer. This location is the lower left corner of a rectangular block of pixels.
Several parameters control the processing of the pixel data before it is placed into client memory.
This reference page describes the effects on glReadPixels of most, but not all of the parameters specified by these three commands. This pixel is said to be the ith pixel in the jth row. Pixels are returned in row order from the lowest to the highest row, left to right in each row. Each component is converted to floating point such that the minimum depth value maps to 0.0 and the maximum value maps to 1.0. Before an n index is used to look up a value in a table of size 2 it must n be masked against 2 -1.