Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Is the Z axis positive or negative "into the screen"?

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2012
    Posts
    7

    Is the Z axis positive or negative "into the screen"?

    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

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,190
    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).
    Last edited by Dark Photon; 12-27-2012 at 06:33 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •