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: gluLookAt and the modelview matrix.

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    gainesville, fla, usa
    Posts
    17

    gluLookAt and the modelview matrix.

    Hi,
    I am struggling with gluLookAt(...). Could someone please give me an indepth explanation of it? For example, say I am given the
    eye point, the at point and the up direction,
    how do I formulate the modelview matrix?

    Thanks for your time.

  2. #2
    Junior Member Newbie
    Join Date
    Apr 2009
    Posts
    18

    Re: gluLookAt and the modelview matrix.

    Well gluLookAt( POSITION, DIRECTION WHERE YOU LOOK, UP VECTOR)

    the POSITION is a vector of 3 components and here is where you say where the camera is.
    The next parameter is where you say... where to look at.

    And the last one is the up vector... Is where you choose where is UP in the scene...

  3. #3
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,367

    Re: gluLookAt and the modelview matrix.

    how do I formulate the modelview matrix?
    You don't formulate the modelview matrix with gluLookAt, it does it for you!
    And if you want to re-write the gluLookAt function for your own purpose, look at the gluLookAt man page and if it is not enough you can glance at the mesa opengl implementation source code.

Posting Permissions

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