orthogonal camera view

how do u assign a camera for an orthogonal view and set it 2 units away from the origin?
thank you…

glOrtho(set up your orthographic projection here)

glTranslatef(pass your 2 units here)

Originally posted by ThunderSoul:
how do u assign a camera for an orthogonal view and set it 2 units away from the origin?
thank you…

Try to use from two different matrices to do this. Apply the ortho viewing to the projection matrix and apply the translation to the modelview matrix.
Another way to translate the camera-Coordinate system essentially- to a specified place is to use from the gluLookAt() function. This function consist of some translatios and rotations to transform the current coordinate system.
-Ehsan-