what when Up vector not orthogonal to Lookat?

Hello everybody,

my question I think might be trivial but can’t find an answer anywhere.
What happens if I have an upVector which is not orthogonal to the LookAt vector in the gluLookAt? Does opengl orthogonlize it somehow?

Many thanks
GC.

Nothing. The up vector is only used to compute the camera X-axis. If it is not orthogonal to the view vector( Z-axis), the result would be a non-normalized vector, but for safety, the computed X-axis should always be normalized after its computation.

See this for more information about gluLookAt:
http://www.opengl.org/sdk/docs/man/xhtml/gluLookAt.xml

You may also take a look to the gluLookAt implementation is mesa3d code.

Many thanks!