Results 1 to 2 of 2

Thread: glPerspective or glLookAt

  1. #1
    Member Newbie
    Join Date
    Nov 2010
    Posts
    31

    glPerspective or glLookAt

    I have large 3d cube that I created and on the screen it looks like 3d wire frame cube. I have also created little cube inside of the bigt cube and little cube was created by call
    Code :
    glutSolidCube(50);
    but little cube looks flat (doesnt look like 3d). It looks just like square drawn on the screen. I am confused on using glPerspective or glLookAt and where these 2 should be placed inside the program.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Nov 2010
    Location
    Brazil, Rio de Janeiro
    Posts
    147

    Re: glPerspective or glLookAt

    Do you mean gluPerspective and gluLookAt?

    If so, gluPerspective sets up your projection matrix, the matrix that will be applied to all vertices projecting onto the screen. gluPerpective creates a view frustrum.

    gluLookAt sets up your camera. Where the camera is and to where the camera is pointing as well as the orientation.

    gluPerpective
    gluLookAt

Similar Threads

  1. Performance of glOrtho VS glPerspective (and switching cost)
    By Mctittles in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 08-26-2012, 10:49 AM
  2. Near & far parameter in glfrustum-glperspective c++
    By Agata_ in forum OpenGL: General
    Replies: 14
    Last Post: 08-24-2012, 03:25 AM
  3. glPerspective
    By joker40 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-20-2011, 07:29 PM
  4. Replies: 2
    Last Post: 12-04-2000, 08:24 AM
  5. glPerspective
    By Muerte in forum OpenGL: Basic Coding
    Replies: 13
    Last Post: 10-06-2000, 08:09 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