*/\r
/*void mouse(int btn, int state, int x, int y) {\r
\r
-}*/\r
+}*//*\r
static void\r
mouse(int button, int state, int x, int y)\r
{\r
lightStartY = y;\r
glutPostRedisplay();\r
}\r
-}\r
+}*/\r
\r
+void idle() {\r
+ angle = (int)(angle + 10) % 360;\r
+ angle2 = (int)(angle2 + 10) % 360;\r
+ glutPostRedisplay();\r
+}\r
\r
/**\r
* Draw a floor.\r
\r
glPushMatrix();\r
\r
- //glTranslatef(0.0, 0.0, 0.0);\r
- \r
- glutSolidTeapot(30); // Draw teapot for test\r
+ glTranslatef(0.0, 0.0, 0.0);\r
+ glutWireTeapot(30); // Draw teapot for test\r
glPopMatrix();\r
\r
glPushMatrix();\r
gluPerspective(\r
60.0, /* field of view in degree */\r
1.0, /* aspect ratio */ \r
- -900.0, /* Z near */\r
+ 0.0, /* Z near */\r
900.0 /* Z far */\r
); \r
\r
glDepthFunc(GL_LEQUAL); // the type\r
glEnable(GL_CULL_FACE);\r
glEnable(GL_TEXTURE_2D);\r
- glLineWidth(3.0);\r
+ glLineWidth(1.0);\r
\r
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);\r
\r
glutReshapeFunc(windowReshape);\r
glutDisplayFunc(display);\r
- glutMouseFunc(mouse);\r
- glutMotionFunc(motion);\r
+ //glutMouseFunc(mouse);\r
+ //glutMotionFunc(motion);\r
+ glutIdleFunc(idle);\r
\r
makeMenu();\r
\r