View Full Version : gluLookAt or glRotatate-glTranslation- glScale ??

02-07-2007, 01:57 AM

moving the camera with gluLookAt or handling an object with glRotatate-glTranslation-glScale together give the same results?

Any difference?

02-07-2007, 02:48 AM
The concept of a camera doesn't exist in OpenGL. It only exist as a concept in your own design. There's only a single matrix (the modelview matrix) to modify vertices, and it is conceptually composed of viewpoint transforms and object transforms. Therefore, given corresponding parameters, they are exactly the same.

02-07-2007, 06:39 AM
Originally posted by Bob:
The concept of a camera doesn't exist in OpenGL. Ok, Im not an expert, but in this text "camera" appears many times.


02-07-2007, 07:16 AM
Throughout the entire first half, they directly talk about a camera analogy at every point the word "camera" appears in the text. In the second half, half the occurances of the word is directly used in the context or camera analogy, and the other half it's indirectly used in the camera analogy context.

So to me it's pretty clear; they are very careful to not write about a direct camera in OpenGL, but a camera analogy.

At several places the ask the question; are we moving the object or are we moving the camera in the opposite direction? OpenGL doesn't care, becuase it can't tell the difference. There's only a handfull of functions that can possibly affect the matrices, and none of them distinguish between cameras or objects.