-/**\r
- * init function; sets initial OpenGL state\r
- */\r
-void init() {\r
- glLightfv(GL_LIGHT0, GL_AMBIENT, ambient0);\r
- glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse0);\r
- glLightfv(GL_LIGHT0, GL_SPECULAR, specular0);\r
- glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, direction0);\r
-\r
- glLightfv(GL_LIGHT1, GL_AMBIENT, ambient1);\r
- glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse1);\r
- glLightfv(GL_LIGHT1, GL_SPECULAR, specular1);\r
- glLightfv(GL_LIGHT1, GL_SPOT_DIRECTION, direction1);\r
-\r
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT, glightmodel);\r
- glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);\r
-\r
- glEnable(GL_LIGHT0);\r
- glEnable(GL_LIGHT1);\r
- glEnable(GL_LIGHTING);\r
-}\r
-\r