Im getting confused about specifying the viewing volume…I was trying to see how changing the viewing volume affects the object.So this is what i did:
glColor3f(1.0,0.0,0.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-100.0,100.0,-100.0,100.0,0.0,100.0); glBegin(GL_LINES); glVertex3f(0,0,0); glVertex3f(10,50,-100); glEnd(); glFlush();
Whats really confusing me is the near and far parameters for glOrtho.
Here,i could see the line drawn when i gave near and far as:
the line was also visible when i gave
Now my question is:
1)How are near and far assigned??
2)Doesnt the near, far parameters depend on the camera??
(I mean are ther wrt the camera positon?)
Here,my camera is at origin.
So does it make sense if i give near as say 100?? How can the camera view it?!
I tried googling about it…But all that made me even more confused!
Im very new to OpenGL…
Please Help.Thanks in advance.