#include <math.h>\r
#include <GL/gl.h>\r
#include <GL/glut.h>\r
+#include <time.h>\r
\r
#include "bitmap.h"\r
\r
*/\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
+ printf("Angle 1: %d, Angle 2: %d", angle, angle2);\r
+ sleep(2);\r
+ glutPostRedisplay();\r
+}\r
\r
/**\r
* Draw a floor.\r
\r
glPushMatrix();\r
\r
- //glTranslatef(0.0, 0.0, 0.0);\r
- \r
+ glTranslatef(0.0, 0.0, 0.0);\r
glutWireTeapot(30); // Draw teapot for test\r
glPopMatrix();\r
\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