In Direct3D you only call BeginScene() before you draw and EndScene() after you are done.
You don't call it every time during the scene in which you want to draw. Call them both ONCE per frame.
I'm sure OGL is the same.
But I think that has already been said in this thread and you still have not corrected your code.One thing I see is that you have "glBegin() and glEnd()" after each polygon. This causes a major slow down (several orders of magnitude on one program I was working on).