Units in OpenGL

Hello All
I am a beginner in OpenGL and I am using OpenGL with MFC, and I am doing now 2D graphics,
I used the function
gluOrtho2D(-10.0f, 10.0f, -10.0f, 10.0f);
and I am wondering what is the units that used in OpenGL, in my code it is not pixels sure, I think it may be centimeters, but I am not sure, how can I modify this to use pixels, and I feel that, I think I don’t understand gluOrtho2D too much!

The short answer is OpenGL does not have units. The choice of units is up to your application.

See the OpenGL FAQ at http://www.opengl.org/resources/faq/technical/transformations.htm
for how to setup OpenGL to do 2D rendering in screen space.

This will get you close…

gluOrtho2D(0, windowWidth, 0, windowHeight);