Backface Culling in Lesson10 NeheGL Tutorials
I have tried to perform backface culling in the code of lesson10 nehe's tutorials, and i succeeded.
1. I suppose that the camera position is 0,0,0 and it's direction is 0,0,-1 initially.
2. I rotate the camera direction in the same direction as the rotation of the scene, but translate the camera position in opposite direction.
3. I then apply the plane eqn. taking the camera as a plane and check all vertices of all polys again it.
4. If all vertices of a polygon lie to the back of the camera, I mark it as not to be displayed.
5. It works!
6. Why ?
(note : nothing else works - I've tried everything else)