Thread: OpenGL help

  1. #1
    Registered User
    Join Date
    Jul 2004

    Unhappy OpenGL help

    Dear Seniors!

    I am new to OpenGL and trying to use the utility function "gluLookAt" and it just start rotating the object and giving a very different behaviour.

    Can anybody tell me the complete concept of this API, and how to use it.


  2. #2
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Where circles begin.
    now....i'm pretty new to OpenGL myself, but i do understand the gluLookAt(); function and how it works so...

    the gluLookAt function looks like this:
    gluLookAt(PositionX, PositionY, PositionZ, ViewX, ViewY, ViewZ, UpX, UpY, UpZ);

    the way i like to think of it, is the Position values, position the "feet" of the camera, the view values position the "eye" of the camera, and the up values simply specify which plane is up.

    my values for gluLookAt are as follows:

    PositionX = 0.0;
    PositionY = 0.8;
    PositionZ = 5.0;
    ViewX = 0.0;
    ViewY = 0.8;
    ViewZ = 0.0;
    UpX = 0.0;
    UpY = 1.0;
    UpZ = 0.0;

    those values work, assuming you have your glPerspective set-up like so:

    gluPerspective(50.0f, 1.0f, 0.1f, 25.0);
    hope that helps


  3. #3
    A little advice: use the search feature of the message board.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 10:17 AM
  2. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  3. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM
  4. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 10:14 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM