I'm no OpenGL expert myself, but enabling over and over in the main loop doesn't seem like a good idea.
Same with the declaration of a perspective, you only need it once unless you want to change it. Also sometimes calling glMatrixmode and glLoadIdentity in the loop may make it so that your program doesn't display anything even when it's working (though for some things it's required, other times it messes up your openGL drawing).
Try taking all that shouldn't be looping out of the loop to see if it works. It would also be good to know what the draw function does...