Step 1: I use glVertex() to draw a shape, say a rectangle, in 3D space.
Step 2: I then draw things inside this rectangle - for example with glutStrokeCharacter() and with glVertex() again.
I need to keep what are drawn in step 2 inside the rectangle drawn in step 1, clipping away anything that goes outside the boundary. Can someone give some hint on how to do this?