Tom Kelliher, CS 320
Apr. 3, 1998
Announcements:
From last time:
Outline:
Assignment: Do/finish the lab, run lightlab.c with flat shading
rather than smooth shading.
Pertinent functions (line numbers refer to code handout):
glShadeModel() (253): GL_SMOOTH, GL_FLAT
glMaterial*() (255--258):
GL_BACK, GL_FRONT_AND_BACK
GL_AMBIENT_AND_DIFFUSE
GL_EMISSION
glLight*() (139, 260--262):
The fourth value in a light's position.
glEnable() (264--267):
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 homepage and begin
experimenting.