depth buffer and glVertex2f doubt

If we ve enabled depth test…and glut_depth in display mode…and while drawing say a simple polygon…if we use glvertex2f(x,y)…and suppose we ve defined our viewing vol as glOrtho(x,x1,y,y1,-10,10);
…then where actually in z-axis the polygon is drawn ?? is it in z=0 plane or z=-10 plane coz depth buffer is initialized to farthest value?? …anyone plz help me get this…

When you are not sure, read the docs :
http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml
It is written black on white “When only x and y are specified, z defaults to 0 and w defaults to 1”.
This z is not the same as the depth buffer value, which store a normalized value of the result of the projection. In your case with z=0 and an ortho projection on -10;10 range, it would be 0.5

Z is at 0: http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml

When only x and y are specified, z defaults to 0 and w defaults to 1. When x, y, and z are specified, w defaults to 1.