Backface culling

There is a weird bug I think. I have been pulling out my hair with a test that was failing with my new collision code and finally traced it to the fact that my code depends on the triangle winding to calculate a plane euqation for triangles. I was using the standard cube we have been using in the demos, and after debugging I found that many of the triangles are wound the wrong way… yet they are being rendered with backface culling on. Assuming that we are using the clockwise winding then many of the cube triangles should not have been rendering. I have looked through the code and have not been able to track down the issue yet.

Someone double check for me… the cube on the left hand side is wound CCW and not CW.

Bah, the winding is correct… I had a bug in my CD code.