How to retrieve points information on a rendered window?

Say, a window has been created and there have been some points rendered. Which openGL function can I use to get x,y,z,r,g,b values of all the points rendered on that screen? Thank you very much!

Look at glReadPixels to get colors and depth values. Look at gluUnProject to get back to world-space.

PS. Please don’t cross post.