In OpenGL there is no camera. There is no world. There no locations. OpenGL is a state machine, rasterizer, and basically a matrix multiplicator.
If you "move" or "rotate" the "camera" - either by your own means or using gluLookAt (which does all the matrix work for you), you really perform matrix calculations on everything you want to see (mostly information about what makes up your world - triangles, quads).
glLoadIdentity resets the identity matrix, in terms of the projection and modelview matrices - it essentially resets the matrix back to its default state.
It's a lot easier to perform a glLoadIdentity(), then do your glTranslatef calls, followed by the rotations you want your models to have - rather than calculating the steps you have to move away from the point you're on now.
|