- //glTranslatef(camx, camy, camz);\r
- \r
- // **NOTE: Currently this rotation function is all that moves the camera off\r
- // the flat surface. Need to integrate function into gluLookAt\r
- //glRotatef(rot, 1.0, 0.0, 0.0);\r
+ float aspect = (float)height / (float)width;\r
+ if ( width > height ) aspect = (float)width / (float)height;\r
+\r
+ gluPerspective(\r
+ 90.0,\r
+ aspect,\r
+ 0.1,\r
+ 100\r
+ );\r
+\r
+ glMatrixMode(GL_MODELVIEW);\r
+ glLoadIdentity();\r
+\r
+ gluLookAt(\r
+ 0.0, 0.0, 15.0, /* eye is at (x,y,z) */\r
+ 0.0, 0.0, 0.0, /* center is at (x,y,z) */\r
+ 0.0, 1.0, 0.0 /* up is in postivie Y direction */\r
+ );\r
+\r
+ glRotatef(45.0, 1.0, 0.0, 0.0);\r