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.
Thanx
Printable View
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.
Thanx
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:
hope that helpsCode:gluPerspective(50.0f, 1.0f, 0.1f, 25.0);
-psychopath
A little advice: use the search feature of the message board.