44 glClear(GL_COLOR_BUFFER_BIT);
46 glColor3f(1.0, 1.0, 1.0);
47 glutWireTorus(0.5, 3, 15, 30);
67 glClearColor(0.0, 0.0, 0.0, 1.0);
68 glColor3f(1.0, 1.0, 1.0);
70 glMatrixMode(GL_PROJECTION);
72 gluPerspective(60.0, 4.0 / 3.0, 1, 40);
74 glMatrixMode(GL_MODELVIEW);
76 gluLookAt(4, 6, 5, 0, 0, 0, 0, 1, 0);
79 int main(
int argc,
char **argv) {
80 glutInit(&argc, argv);
81 glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
84 glutInitWindowPosition(80, 80);
85 glutInitWindowSize(1000, 800);
86 glutCreateWindow(
"A Torus on a Plane");
int main(int argc, char **argv)