/* Include needed files */ #include #include #include #include #include #include "glut.h" // The GL Utility Toolkit (Glut) Header #define WIDTH 500 #define HEIGHT 500 /***************************************************************************/ void init_window() /* Clear the image area, and set up the coordinate system */ { /* Clear the window */ glClearColor(0.0,0.0,0.0,0.0); glShadeModel(GL_SMOOTH); glOrtho(0,WIDTH,0,HEIGHT,-1.0,1.0); } /***************************************************************************/ void display ( void ) // Create The Display Function { glClear(GL_COLOR_BUFFER_BIT); // CALL YOUR CODE HERE glFlush(); } /***************************************************************************/ int main (int argc, char *argv[]) { /* This main function sets up the main loop of the program and continues the loop until the end of the data is reached. Then the window can be closed using the escape key. */ glutInit ( &argc, argv ); glutInitDisplayMode ( GLUT_SINGLE | GLUT_RGB ); glutInitWindowSize ( 500,500 ); glutCreateWindow ( "Riverside Graphics" ); glutDisplayFunc ( display ); init_window(); //create_window glutMainLoop ( ); // Initialize The Main Loop }