# glOrtho coordinates issue

When we define coordinates that are within our window by using glOrtho, such a call

glOrtho(left,right,bottom,top,near,far);

will result a coordinate system with mathematical boundaries of x E [left,right), y E [bottom,top) and z E [-near,-far] or z E [-far,-near](as clipping planes bounds only the z axis initially.)

For example if I call gIOrtho(-0.300,0.100,-0.300,0.100,-0.300,0.100); then my coordinate system will be x E [-0.300,0.100) and y E [-0.300,0.100). However when z axis is considered, z E [-0.100,0.300].
I mean if I attempt to draw a point to the point (0.0,0.0,-0.100) or to the point (0.0,0.0,0.300), I will be able to see these points at my screen.

Is this correct?

I am asking this question because when I tried this, the result is changed according to the current window size and screen resolution. I wonder whether glOrtho defines exact boundaries for coordinate axises or not?

Are you calling glViewport?

You should call glViewport first when ever the dimensions of the screen change.

What I mean by changing the window size is changing the related arguments of glutInitWindowSize and relatively changing the related values within the code… Therefore I don’t call glViewport, because I want to understand only the behaviour of glOrtho independently. So forget about any window size and screen resolution change and assume they are constant. What I really wonder is as I mentioned earlier “whether glOrtho defines exact boundaries for coordinate axises or not”. Is the numerical example that I have given is correct about the coordinate boundaries? Is first and last points of the coordinate axises (x,y and z) are included or not? Does the definition of glOrtho guaranties that those points are included or not?