   Problem creating the camera class
  Hi I have a problem of creating the simple camera class where i followed from the book. The glLoadMatrix(float) function didnt seems work or something. Whatever values I placed, red quads appear the same location. This is the simple code i have used in the book://This is the code that setting the new ModelView matrix for the cameravoid Camera::setModelViewMatrix(void) {float m[16];Vector3 eVec(this->eye.x, this->eye.y, this->eye.z);m[0] = u.x; m[4] = u.y; m[8] = u.z; m[12] = -eVec.dot(u);m[1] = v.x; m[5] = v.y; m[9] = v.z; m[13] = -eVec.dot(v);m[2] = n.x; m[6] = n.y; m[10] = n.z; m[14] = -eVec.dot(n);m[3] = 0; m[7] = 0; m[11] = 0; m[15] = 1.0;glMatrixMode(GL_MODELVIEW);glLoadMatrixf(m);}  //This is the code setting the eye and u,v and n vector void Camera::set(Point3 eye, Point3 look, Vector3 up) {this->eye.set(eye);n.set(eye.x-look.x, eye.y-look.y, eye.z-look.z);u.set(up.cross(n));n.normalize(); u.normalize();v.set(n.cross(u));setModelViewMatrix();}So when the program runs it should go to set func then the setmodelviewmatrix.Lastly, the code for the perspectivevoid Camera::setShape(float vAng, float asp, float nearD, float farD){glMatrixMode(GL_PROJECTION);glLoadIdentity();gluPerspective(vAng, asp, nearD, farD);setModelViewMatrix();}I am not sure whether the matrix up there is wrong or something   
  If the shape is at constant position then the error is probably one of the following : - you are setting the modelview matrix at some other location as well - you are not updating your camera position in program, or reseting camera to a default value somwhere in your code ...But i can't say for shure ... if you could post the whole code then i might be able to help you.Also note that there is gluLookAt(if i remember corectly) so if this code isn't intended for learning how to construct camera, use the glu function ;).My observation - why call camera update in projection update function ?ModelView(camera) & Projection matrices are compleatly independant of each other at construction time (they get multiplied lather by GPU), so update projection(setShape()) should realy have nothing to do with update camera.Projecion matrix is usualy updated on render target resize (render window for ex.)