window coordinates in glReadPixels

Hello,
In the glReadPixels function, I’d like to know what are exactly the windows coordinates parameters x and y. Are they coordinates in pixels, or relative coordinates ? what are the values for the corners of the screen ?
I want to get the full screen in a 64*64 pixels array, what parameters may I use ?
Thanks for your help !

they are the coordinates in pixels.

top-left corner of the frame buffer is (0, 0)
bottom-right corner is (window_w, window_h)

window_w is the width of the window, window_h is the height of the window.

this is what I would try.

// copy back buffer into the top left area of the auxiliary buffer
GLint NumAuxiliaryBuffers;

glGetIntegerv(GL_AUX_BUFFERS, &NumAuxiliaryBuffers);

if (NumAuxiliaryBuffers < 1)
return 0;

glReadBuffer(GL_BACK);
glDrawBuffer(GL_AUX0);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glPixelZoom(64 / (GLfloat) window_w, 64 / (GLfloat) window_h);
glRasterPos2i(0, 0);
glCopyPixels(0, 0, window_w, window_h, GL_AUX0);

// read the auxilary buffer into the main memory
GLubyte Frame[64][64];
glReadBuffer(GL_AUX0);
glDrawBuffer(GL_BACK);
glReadBuffer(0, 0, 64, 64, GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid*) Buffer);

[This message has been edited by oliii (edited 03-24-2003).]

[This message has been edited by oliii (edited 03-24-2003).]

top-left corner of the frame buffer is (0, 0)
bottom-right corner is (window_w, window_h)

No, bottom left corner is (0, 0), and top right corner is (window_w - 1, window_h - 1).