I have made up a simple Cube with using GL_TRIANGLE_STRIP and set one light.
The first Quad(first 4 vertices) are lit correctly, but the next quads(defined by 2 vertices each) are not. Only the right side is lit, cause the new normal vector is only applied to the 2 new vertices. How can i fix this problem?
Here is a short piece of code:
glBegin(GL_QUAD_STRIP);
glNormal3fv(normalize_vec(torso[0], torso[1], torso[2]).vec_array);
glVertex3fv(torso[0].vec_array);
glVertex3fv(torso[1].vec_array);
glVertex3fv(torso[3].vec_array);
glVertex3fv(torso[2].vec_array);
glNormal3fv(normalize_vec(torso[3], torso[4], torso[5]).vec_array);
glVertex3fv(torso[5].vec_array);
glVertex3fv(torso[4].vec_array);
glNormal3fv(normalize_vec(torso[5], torso[6], torso[7]).vec_array);
glVertex3fv(torso[7].vec_array);
glVertex3fv(torso[6].vec_array);
glNormal3fv(normalize_vec(torso[7], torso[8], torso[9]).vec_array);
glVertex3fv(torso[9].vec_array);
glVertex3fv(torso[8].vec_array);
glEnd();