I wanted to know to the correspondence between the pixels of Windows and the values of opengl. Because when i made clic on the window i get de X coordinate of the window and the Y coordinate, but i have to know the coordinate in opengl, I used a 900*600 window and 2d opengl pixel format without perspective. thankx.
You can use gluUnProject for that.
Note that Windows’ coordinates use a top-left origin and OpenGL uses bottom-left.
Your mouse y-coordinate needs to be inverted.