X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=fc078e25777cd0bc54371664c20e04b010908090;hp=749c2aae90fe3b9b3bc631b1d58fc45c1d62fbf8;hb=b4de9c715f7b22cc0c08fab65cebc566e938a248;hpb=27465ced4249899ef9067cf878f3aaddff4291e0 diff --git a/scene.c b/scene.c index 749c2aa..fc078e2 100644 --- a/scene.c +++ b/scene.c @@ -123,8 +123,8 @@ GLfloat angle = -150; /* in degrees */ GLfloat angle2 = 30; /* in degrees */ /* Near and far parameters */ -GLfloat near = -10; -GLfloat far = 10; +GLfloat near = -100; +GLfloat far = 100; /* Zoom factor for mouse movements */ GLfloat zoomFactor = 1.0; @@ -499,7 +499,7 @@ void makeMenu() { * @param h New height */ void windowReshape(int w, int h) { - glViewport(0, 0, (GLsizei) w, (GLsizei) h); + /*glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); if (w <= h) @@ -509,7 +509,7 @@ void windowReshape(int w, int h) { glOrtho(near*(GLfloat)w/(GLfloat)h, far*(GLfloat)w/(GLfloat)h, near, far, near, far); glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); + glLoadIdentity();*/ } /** @@ -665,7 +665,7 @@ void display() { // Draw teapot for a test object glPushMatrix(); - glTranslatef(0.0, 0.0, 0.0); // **NOTE: Teapot does not rest on surface + glTranslatef(0.0, 0.5, 0.0); // **NOTE: Teapot does not rest on surface glColor3f(0.5, 0.5, 0.5); glutSolidTeapot(1); glPopMatrix(); @@ -696,7 +696,7 @@ void init() { 1.0, /* aspect ratio */ near, /* Z near */ far /* Z far */ - ); + ); glLightfv(GL_LIGHT0, GL_POSITION, light0_pos);