#include "glut.h" void myDisplay() { glClear ( GL_COLOR_BUFFER_BIT ); glBegin( GL_POLYGON ); glVertex2f( -0.5, -0.5 ); glVertex2f( -0.5, 0.5 ); glVertex2f( 0.5, 0.5 ); glVertex2f( 0.5, -0.5 ); glEnd(); glFlush(); } // end of myDisplay() int main ( int argc, char** argv ) { glutInit( &argc, argv ); glutCreateWindow ( "simple demo program" ); glutDisplayFunc( myDisplay ); glutMainLoop(); } // end of main()