glMatrixMode(GL_MODELVIEW);
drawPolygon();
/* draw normally */
glPushMatrix();
/* save current matrix */
glTranslatef(xl, yl, zl); /* translate back */
glMultMatrixf(m); /* project */
glTranslatef(-xl, -yl, -zl); /* move light to origin */
drawPolygon();
/* draw polygon again for shadow */
glPopMatrix();
/* restore original transformation */
...