X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=scene.c;h=aa3967bf518a0b83cc9a16a08d05f26226bb6ba2;hb=fe0a6a8ae3ff8a57f0f92e6f9de8d7814886c94d;hp=f3650e649e2850436eb2cf3590a5b3bf3aaa16ff;hpb=e369734d5013399c5c726f42b9db3e0a712df4c3;p=atyndall%2Fcits2231.git diff --git a/scene.c b/scene.c index f3650e6..aa3967b 100644 --- a/scene.c +++ b/scene.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "bitmap.h" @@ -483,8 +484,8 @@ void makeMenu() { * @param h New height */ void windowReshape(int w, int h) { - GLdouble near = -10.0; - GLdouble far = 10.0; + GLdouble near = -1000.0; + GLdouble far = 1000.0; glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); @@ -555,7 +556,9 @@ motion(int x, int y) void idle() { angle = (int)(angle + 10) % 360; - angle2 = (int)(angle2 + 10) % 360; + //angle2 = (int)(angle2 + 10) % 360; + printf("Angle 1: %f, Angle 2: %f\n", angle, angle2); + sleep(2); glutPostRedisplay(); } @@ -619,7 +622,7 @@ void display() { glPushMatrix(); - glTranslatef(0.0, 0.0, 0.0); + //glTranslatef(0.0, 0.0, 0.0); glutWireTeapot(30); // Draw teapot for test glPopMatrix(); @@ -647,10 +650,10 @@ void init() { glLoadIdentity(); gluPerspective( - 60.0, /* field of view in degree */ - 1.0, /* aspect ratio */ - 0.0, /* Z near */ - 900.0 /* Z far */ + 60.0, /* field of view in degree */ + 1.0, /* aspect ratio */ + -1000.0, /* Z near */ + 1000.0 /* Z far */ ); glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, 1);