Polygons, Cubes and Light

Hi again. I have a scene constructed with cubes, every cube is constructed with 6 polygons. When I add light, it seems to be somewhat ‘inside’ out. I can see the things that are on the inside of a polygon. I applied a normal to every vertex and made sure that GL_SMOOTH is set. My question is, what cause this problem?

Did you enable depth testing, and clear the depth buffer each frame?

Originally posted by Deiussum:
Did you enable depth testing, and clear the depth buffer each frame?

Yes I did!

Do you have face culling enabled? If you do it’s possible that you are not using the correct winding order, or have the culling setup to cull the wrong faces.