X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=3c25623b0741b460ad6918b4975799a7faa7c161;hp=d06dd3c3adca97d186b92b82f31de7ace8a43e16;hb=ec80d8ef3d8a350840e9b04a37c6b1ee09270a05;hpb=241ec710cf9e36891031b23e5bad89beb20c0944 diff --git a/scene.c b/scene.c index d06dd3c..3c25623 100644 --- a/scene.c +++ b/scene.c @@ -297,7 +297,7 @@ void display() { glLoadIdentity(); gluLookAt( - 0.0, 8.0, 30.0, /* eye is at (x,y,z) */ + 30.0, 30.0, 30.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 */ ); @@ -347,9 +347,6 @@ void display() { * init function; sets initial OpenGL state */ void init() { - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glLightfv(GL_LIGHT0, GL_POSITION, light0_pos); glLightfv(GL_LIGHT0, GL_AMBIENT, ambient0); glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse0); @@ -405,15 +402,6 @@ int main(int argc, char **argv) { glEnable(GL_TEXTURE_2D); glLineWidth(1.0); - // **NOTE: Currently the perspective and look-at code is static, for testing purposes - //glMatrixMode(GL_PROJECTION); - //gluPerspective( - // 40.0, /* field of view in degree */ - // 1.0, /* aspect ratio */ - // 1.0, /* Z near */ // **NOTE: Seems to be issue with near < 0 causing invisible everything - // 100.0 /* Z far */ - // ); - glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); glutReshapeFunc(windowReshape);