X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=f3650e649e2850436eb2cf3590a5b3bf3aaa16ff;hb=e369734d5013399c5c726f42b9db3e0a712df4c3;hp=23144bc8811c4ff811136063b9cf41ee25877add;hpb=6c77eb6c640fcb4ac94e063f5e08c907c3b7702b;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index 23144bc..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. @@ -614,9 +619,8 @@ void display() { glPushMatrix(); - //glTranslatef(0.0, 0.0, 0.0); - - glutSolidTeapot(30); // Draw teapot for test + glTranslatef(0.0, 0.0, 0.0); + glutWireTeapot(30); // Draw teapot for test glPopMatrix(); glPushMatrix(); @@ -692,14 +696,15 @@ int main(int argc, char **argv) { glDepthFunc(GL_LEQUAL); // the type glEnable(GL_CULL_FACE); glEnable(GL_TEXTURE_2D); - glLineWidth(3.0); + glLineWidth(1.0); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); glutReshapeFunc(windowReshape); glutDisplayFunc(display); - glutMouseFunc(mouse); - glutMotionFunc(motion); + //glutMouseFunc(mouse); + //glutMotionFunc(motion); + glutIdleFunc(idle); makeMenu();