From e369734d5013399c5c726f42b9db3e0a712df4c3 Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Tue, 18 Oct 2011 19:00:57 +0800 Subject: [PATCH] --- scene.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scene.c b/scene.c index c579335..f3650e6 100644 --- a/scene.c +++ b/scene.c @@ -508,7 +508,7 @@ void windowReshape(int w, int h) { */ /*void mouse(int btn, int state, int x, int y) { -}*/ +}*//* static void mouse(int button, int state, int x, int y) { @@ -551,8 +551,13 @@ motion(int x, int y) lightStartY = y; glutPostRedisplay(); } -} +}*/ +void idle() { + angle = (int)(angle + 10) % 360; + angle2 = (int)(angle2 + 10) % 360; + glutPostRedisplay(); +} /** * Draw a floor. @@ -697,8 +702,9 @@ int main(int argc, char **argv) { glutReshapeFunc(windowReshape); glutDisplayFunc(display); - glutMouseFunc(mouse); - glutMotionFunc(motion); + //glutMouseFunc(mouse); + //glutMotionFunc(motion); + glutIdleFunc(idle); makeMenu(); -- 2.20.1