Results 1 to 3 of 3

Thread: PROJECTION / MODELVIEW matrix analogy?

  1. #1
    Member 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
    Senior Member Regular Contributor
    Join Date
    Dec 2001
    Location
    Belmont, CA, USA
    Posts
    216

    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
    Member Contributor
    Join Date
    Feb 2002
    Location
    Italia
    Posts
    63

    Re: PROJECTION / MODELVIEW matrix analogy?

    mmmm... yes now I understand thanx

Similar Threads

  1. Clarification (Projection Matrix & ModelView Matrix)?
    By CroCodile in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-01-2013, 11:43 AM
  2. Using modelview/projection matrix to do a projection myself
    By AllForum in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 08-30-2012, 07:42 AM
  3. getting the inverse modelview projection matrix
    By cherryyosh in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-04-2009, 08:09 AM
  4. Getting the inverse Modelview*Projection Matrix
    By Jan in forum OpenGL: General
    Replies: 2
    Last Post: 05-17-2004, 01:46 AM
  5. Difference between Modelview matrix and projection matrix
    By aphlai in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 08-22-2001, 07:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean