- /* Reposition the light source. */\r
- lightPosition[0] = 12*cos(lightAngle);\r
- lightPosition[1] = lightHeight;\r
- lightPosition[2] = 12*sin(lightAngle);\r
- lightPosition[3] = 0.0;\r
+ gluPerspective(\r
+ 75.0,\r
+ aspect,\r
+ 0.1,\r
+ 200\r
+ );\r
+\r
+ glMatrixMode(GL_MODELVIEW);\r
+ glLoadIdentity();\r
+\r
+ gluLookAt(\r
+ 0.0, 0.0, 15.0 + (zoom*zoomFactor), /* eye is at (x,y,z) */\r
+ 0.0, 0.0, 0.0, /* center is at (x,y,z) */\r
+ 0.0, 10.0, 0.0 /* up is in postivie Y direction */\r
+ );\r
+\r
+ glRotatef(40.0, 1.0, 0.0, 0.0);\r
+\r
+ /* Reposition the light source 0. */\r
+ lightPosition0[0] = 12*cos(lightAngle0);\r
+ lightPosition0[1] = lightHeight0;\r
+ lightPosition0[2] = 12*sin(lightAngle0);\r
+ lightPosition0[3] = 0.0;\r
+\r
+ /* Reposition the light source 1. */\r
+ lightPosition1[0] = 12*cos(lightAngle1);\r
+ lightPosition1[1] = lightHeight1;\r
+ lightPosition1[2] = 12*sin(lightAngle1);\r
+ lightPosition1[3] = 0.0;\r