Okay well a good idea came to me to record it and flish through each frame to see the text displayeed before the windo closes down (it’s only 1 frame REALLY FAST)
and it says
Fatal Error: redisplay needed for window 1, but no display callback
glRect and glRotate are not allowed between glBegin/glEnd. glRotate modifies the active transformation, which affects all vertices issued afterwards, so it would be clearer to do that first and then draw something otherwise the glRotate call will only have a visible effect in the next frame.
Finally, the axis around which you rotate is (0, 0, 0), hmm…
Why should it? What are the coordinate bounds of your screen? And what are the coordinates of your square? Are you sure your square is within the viewing volume? First suggestion, print out the coordinates of the square you are trying to generate. Make sure the numbers make sense. Next, read up on glOrtho. You have to use it to assign a coordinate system to the window you’ve opened. An example is below. This sets up a coordinate system from -20 to +20 in X and Y, and from +1 to -1 in Z. If your square lies outside this 3D viewing volume, nothing will be drawn on the screen.