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

Thread: about gluLookAt

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2010
    Posts
    1

    about gluLookAt

    I have a few questions about gluLookAt and it would be great if someone can clear them up for me....

    What will the result be, or what is the difference between glRotatef(60.0, 1,0,0) and gluLookAt(60, 0, 5.0, 0,0,0,0,1,0)?
    Are they both rotating? I also have the same question about translation, what is the difference between translating and changing a value in gluLookAt();

    Thanks for reading and answering.

  2. #2
    Member Regular Contributor strattonbrazil's Avatar
    Join Date
    Jun 2007
    Location
    Los Angeles, CA
    Posts
    306

    Re: about gluLookAt

    You can look at the docs for gluLookAt, which usually shows how the matrix is built.

    Here for example, you can see that gluLookAt builds a rotation matrix and then translates the camera after it is applied. As you probably see, you can get along without gluLookAt by using the transform calls directly, but it's just a convenience.

    http://pyopengl.sourceforge.net/docu...LookAt.3G.html
    glMultMatrixf(M); glTranslated (-eyex, -eyey, -eyez);

Posting Permissions

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