How to set Two viewport in OpenGL?

Well look at the code anyway, one projector shows the red bit one shows the green bit. Just ignore all the overlay stuff.

The way I would do it is to model the sitation on reality, you have two eyes seperated horizontally by a short distance, so use gluLookAt(right eye, reference point) for the left projecter and gluLookAt(left eye, reference point) for the right projecter.

You can just change the camera angle and redraw on the other side of the screen you wont need to create two viewports. You could though create two GLUT windows and have one on each screen of the projectors.