10 static void display();
11 static void keyboard(unsigned char key, int x, int y);
15 static Tentacle tentacle;
17 int main(int argc, char **argv)
19 glutInit(&argc, argv);
20 glutInitWindowSize(800, 600);
21 glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE);
23 glutCreateWindow("ludu mice");
24 glutDisplayFunc(display);
25 glutKeyboardFunc(keyboard);
39 glClearColor(1.0, 1.0, 0.0, 1.0);
41 if (!tentacle.init()) {
42 fprintf(stderr, "Failed to initialize tentacle control points.\n");
55 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
58 glMatrixMode(GL_MODELVIEW);
61 tentacle.draw(glutGet(GLUT_ELAPSED_TIME));
66 static void keyboard(unsigned char key, int x, int y)