Hmm, I admit my explanation was a bit confusing.
glFrontFace and the winding of primitves is important for backface culling and determining the material of a vertex (cfr. glLightModel, GL_LIGHT_MODEL_TWO_SIDE, glCullFace, glMaterial).
For lighting calculations however the normals are used to calculate how light reflects off of the primitves you defined.
Assume the following situation:
- One quad (0,0,0), (1,0,0), (1,1,0), (0,1,0) with a normal (0, 0, 1)
- A directional light with direction (0, 0, -1)
In the case of single sided lighting, this means that one side of the quad will always be lit and the other side will be dark, regardless of the winding of the quad. If two sided lighting is enabled, OpenGL will invert the normal for you and use that to perform lighting calculations.
In the situation you describe (opposite facing normals), the quad will be half lit, half dark. This happens because the fixed OpenGL pipeline performs lighting calculations on a per vertex basis. Two of the vertices will be lit, the two others will be dark. Then depending on the shading model you’re using the interior of the quad will be interpolated or use a single color (smooth or flat respectively).
I’ve attached some images that show the effects of all this stuff using the geometry listed below. The images show flat shading, single sided lighting and two sided lighting. The white lines show the normals for each vertex.
glBegin(GL_QUADS);
glNormal3f(0,0,1);
glVertex3f(0, 0, 0);
glVertex3f(1, 0, 0);
glNormal3f(0,0,-1);
glVertex3f(1, 1, 0);
glVertex3f(0, 1, 0);
glEnd();