X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=aa3967bf518a0b83cc9a16a08d05f26226bb6ba2;hp=81c5b562361e52da32384c9c6e0cee3dafcf7389;hb=fe0a6a8ae3ff8a57f0f92e6f9de8d7814886c94d;hpb=e4ce2f6ee4857a66d2f9845c5dc10e35b80f3946 diff --git a/scene.c b/scene.c index 81c5b56..aa3967b 100644 --- a/scene.c +++ b/scene.c @@ -484,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); @@ -557,7 +557,7 @@ motion(int x, int y) void idle() { angle = (int)(angle + 10) % 360; //angle2 = (int)(angle2 + 10) % 360; - printf("Angle 1: %d, Angle 2: %d", angle, angle2); + printf("Angle 1: %f, Angle 2: %f\n", angle, angle2); sleep(2); glutPostRedisplay(); } @@ -622,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(); @@ -650,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);