You are not supposed to have glEnd after glRect.
GlRect by definition is the following series of commands:
glBegin (gl_Polygon)
glVertex …
glVertex …
glVertex …
glVertex …
glEnd
Somehow I missed that glRectf cannot be in between a glBegin and glEnd. I have not found an error yet. I will keep looking. I thought if such a condition existed I would get some kind of error. If there was any kind of error I thought I would notified somehow, compiler error or something. Do I have to look for errors?
It won’t be a compiler error but an OpenGL error. You have to call glGetError every frame. In fact in you keep calling that function continuously in a loop until it returns back no error. You might find it returns back invalid operation for such violations such as glRect between glBegin and glEnd.