02/14/2002
15-462 Graphics I
12
Global Ambient Light
•Set ambient intensity for entire scene
•
•
•The above is default
•Also: local vs infinite viewer
•
•
•More expensive, but sometimes more accurate
GLfloat al[] = {0.2, 0.2, 0.2, 1.0};
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, al);
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER,
                       GL_TRUE);