Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: opengl co-ordinate system and axis range

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2012

    Exclamation opengl co-ordinate system and axis range

    I'm just a beginner . I saw a code in a text book to draw a rectangle using opengl. I altered the vertices but the ouput window was empty and realized i was'nt aware of the third axis Z. And i want to know what is the axis range like x axis ranges from -1 to +1 like that.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Apr 2010
    The range of values you can express on either axis is merely restricted by the data type representing those values. If your coordinates were represented by a signed byte(or char or whatever 8-bit type), values on your axes could be integers in the range of [-128, -127, .. , +126, +127]. With a signed integer you'd have [-2^31, -2^31 + 1, .. , 2^31 - 2, 2^31 - 1].

    What is shown on the screen, after vertices have gone through the pipeline, is determined by the model-, view- and projection-matrices used in the pipeline. So, if any vertex that has been transform by the model- and view-matrix into eye-space and is then projected to normalized device coordinates and lies outside the range [-1, 1] on either the x-, y- or z-axis, the fragment will not show on the screen.

Tags for this Thread

Posting Permissions

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