Камера в OpenGL
Positioning the camera in OpenGL
The OpenGL auxilliary library provides the call gluLookAt() to create the viewing transformation.
gluLookAt(ex,ey,ez,rx,ry,rz,ux,uy,uz>
where (ex,ey,ez) gives the eye point, (rx,ry,rz) gives the reference or 'lookat' point, and (ux,uy,uz) gives the up vector.
This function call postmultiplies the current matrix, so the easiest way to use it is:
glMatrixMode(GL_MODELVIEW);
gluLookAt(ex,ey,ez,rx,ry,rz,ux,uy,uz);
/* setup modelling transformations here */