Tom Kelliher, CS 320
Apr. 20, 2001
Read 6.7--9 (6.1--5).
Do/finish the lab, run lightLab.c
with flat shading rather than
smooth shading.
Exam.
lightLab.c
.
Continuation of lab.
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.