Revolving a polyline to form a 3D object

I wrote a c++ and opengl program that will allow someone to click points on the screen and create a polyline.
How can I create a 3D object from that polyline by revolving it around any axis of my choice (currently the y axis) as the points are being clicked?