switch (key) {
case 27:
- exit(1);
+ exit(0);
default:
return;
}
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_TRIANGLES);
- glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, -30.0);
glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, -30.0);
+ glVertex3f(-0.9, -0.9, -30.0);
glColor3f(0,.9,0);
- glVertex3f(-0.9, 0.0, -30.0);
+ glVertex3f( 0.9, -0.9, -30.0);
+ glColor3f(0,0,.7);
+ glVertex3f( 0.0, 0.9, -30.0);
glEnd();
glFlush();
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
glutMainLoop();
- return 0;
+ return 0;
}