X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=914f3a6526010fd36e9d5f9b33f0945646bbb8b6;hp=a99a692ddb15ed04459b4c93f5d55ccb708d9c1c;hb=6bc2cf448a219d515341068e044b9610e060c747;hpb=db7880146bfa1b0afc00228bf18eddf9770d315e diff --git a/scene.c b/scene.c index a99a692..914f3a6 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 = 20; +GLfloat near = -100; +GLfloat far = 100; /* Zoom factor for mouse movements */ GLfloat zoomFactor = 1.0; @@ -500,7 +500,7 @@ void makeMenu() { */ void windowReshape(int w, int h) { glViewport(0, 0, (GLsizei) w, (GLsizei) h); - glMatrixMode(GL_PROJECTION); + /*glMatrixMode(GL_PROJECTION); glLoadIdentity(); if (w <= h) glOrtho(near, far, near*(GLfloat)h/(GLfloat)w, @@ -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();*/ } /** @@ -635,7 +635,7 @@ void display() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); gluLookAt( - 0.0, 0.0, 10.0, /* eye is at (x,y,z) */ + 0.0, 10.0, 10.0, /* eye is at (x,y,z) */ 0.0, 0.0, 0.0, /* center is at (x,y,z) */ 0.0, 1.0, 0.0 /* up is in postivie Y direction */ ); @@ -696,7 +696,7 @@ void init() { 1.0, /* aspect ratio */ near, /* Z near */ far /* Z far */ - ); + ); glLightfv(GL_LIGHT0, GL_POSITION, light0_pos);