Tom Kelliher, CS 320
Apr. 15, 2011
Take-home exam; you're ready now. When? (Or, keep to Apr. 29?)
Read 6.7-9.
Do/finish the lab, run lightLab.c with flat shading rather than
smooth shading.
Finished Phong light model.
lightLab.c.
Continuation of lab.
Pertinent functions (line numbers refer to code handout):
glShadeModel() (269): GL_SMOOTH, GL_FLAT
glMaterial*() (271-274):
GL_BACK, GL_FRONT_AND_BACK
GL_AMBIENT_AND_DIFFUSE
GL_EMISSION
glLight*() (145, 276-278):
The fourth value in a light's position.
glEnable() (280-285):
GL_LIGHTING
GL_LIGHTx
NORMALIZE
glDisable()
These are all modal.
Can turn lighting on and off.
Normal normals and non-normal normals.
Grab a copy of lightLab.c from class Web page and begin
experimenting.