PDA

View Full Version : Is the Z axis positive or negative "into the screen"?



BB_John
12-25-2012, 10:33 AM
Hello forum again,

Another simple question for you all - is the Z axis positive or negative "into the screen"?

I've seen one tutorial where it's negative. If this is true, why does glfrustum take only positive values for near and far planes, as if it is only concerned with POSITIVE values of Z ?

Thanks in advance,

BBJ

Dark Photon
12-25-2012, 03:04 PM
EYE-SPACE -Z is into the screen. glFrustum/gluPerspective takes positive values for near and far, which equate to Z=-near and Z=-far (in EYE-SPACE).