*/\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
+ glutPostRedisplay();\r
+}\r
\r
/**\r
* Draw a floor.\r
// glEnable(GL_TEXTURE_2D);\r
//}\r
\r
- glBegin(GL_QUADS);\r
+ /*glBegin(GL_QUADS);\r
glTexCoord2f(0.0, 0.0);\r
glVertex3fv(floorVertices[0]);\r
glTexCoord2f(0.0, 16.0);\r
glVertex3fv(floorVertices[2]);\r
glTexCoord2f(16.0, 0.0);\r
glVertex3fv(floorVertices[3]);\r
- glEnd();\r
+ glEnd();*/\r
\r
/*if (useTexture) {\r
glDisable(GL_TEXTURE_2D);\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
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