PDA

View Full Version : gluLookAt() usage



hbkmad
01-24-2014, 09:12 AM
Hello, I need some help with the gluLookAt(); usage. I read a lot but I didn't find any simple example to understand how to use it so I would like to ask for one here. I understood that the default value of it is (0, 0, 0, 0, 0,-1, 0, 1, 0); and let's say that I want to change the point of view to be farther behind so the object would look smaller. This is the first example I would like to understand if I have other questions I will ask them later.
Thank you.

Dark Photon
01-24-2014, 06:58 PM
Hello, I need some help with the gluLookAt(); usage. ... the default value of it is (0, 0, 0, 0, 0,-1, 0, 1, 0); and let's say that I want to change the point of view to be farther behind so the object would look smaller.

With each triplet of values, you specify: 1) where are you, 2) which direction are you looking, and 3) which direction is up (all in world space). So change the first 3 values to some other world-space position