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 3 of 3

Thread: PROJECTION / MODELVIEW matrix analogy?

  1. #1
    Intern Contributor
    Join Date
    Feb 2002
    Location
    Italia
    Posts
    63

    PROJECTION / MODELVIEW matrix analogy?

    It seems to me that the projection matrix and the modelview are very similar.
    once I tryed this:

    glMatrixMode(GL_PROJECTION);
    // call identity, setup perspective
    gluLookAt(...);// or any other way to set the cam
    glMatrixMode(GL_MODELVIEW);
    // render something

    then I tryed

    glMatrixMode(GL_PROJECTION);
    // call identity, setup perspective
    glMatrixMode(GL_MODELVIEW);
    gluLookAt(...);// or any other way to set the cam
    // render something

    and I noticed they work both.
    Is there a good reason or I'm just confused?

    tnx

  2. #2
    Junior Member Regular Contributor
    Join Date
    Dec 2001
    Location
    Belmont, CA, USA
    Posts
    224

    Re: PROJECTION / MODELVIEW matrix analogy?

    They are both 4x4 matrices. There is nothing special about them. First, the vertices are transformed by the modelview matrix, then they are transformed by the projection matrix.

    However, it is important for features like fog that the result of applying the modelview matrix is view space.

    [This message has been edited by Jambolo (edited 07-23-2002).]

  3. #3
    Intern Contributor
    Join Date
    Feb 2002
    Location
    Italia
    Posts
    63

    Re: PROJECTION / MODELVIEW matrix analogy?

    mmmm... yes now I understand thanx

Posting Permissions

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