Results 1 to 2 of 2

Thread: gluLookAt and ModelView

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2009
    Location
    Portugal
    Posts
    28

    gluLookAt and ModelView

    Hi All,

    I'm having some problems getting my model view matrix, in order to use it with gluProject/gluUnproject

    I set up my projection like this:

    // change matrix mode
    glMatrixMode(GL_PROJECTION);
    // clears previous projection
    glLoadIdentity();
    glOrhtox(...)
    // change matrix mode
    glMatrixMode(GL_MODELVIEW);

    after this calling

    GLfixed model_view[16];
    glGetFixedv(GL_MODELVIEW_MATRIX, model_view);

    Gives me a identity matrix that is ok.

    However inside my camera class I call

    gluLookAtx(...) to some position

    After this when I get the modelview I get same stange values that makes impossible to calculate it's inverse inside gluUnproject.

    Any ideas ?

    Thanks,

    Victor

  2. #2
    Junior Member Newbie
    Join Date
    Mar 2009
    Location
    Portugal
    Posts
    28

    Re: gluLookAt and ModelView

    Hi,

    Fixed it by myself.

    Problem was in vector normalizing.

    Thanks anyway.

Similar Threads

  1. gluLookAt and ModelView matrix
    By xiewneqi in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 11-19-2013, 05:18 AM
  2. About Modelview
    By Cucus in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 05-25-2011, 04:33 PM
  3. Convert modelview matrix for use in gluLookAt()
    By khoyee in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-31-2010, 08:37 PM
  4. gluLookAt and the modelview matrix.
    By glguru in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-01-2009, 04:43 PM
  5. gluLookAt and the modelview matrix
    By glguru in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 02-23-2000, 08:25 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