วันอังคารที่ 9 พฤศจิกายน พ.ศ. 2553

XNA: Backface Culling

in XNA, by default, backface culling is on, so that we won't see the object drawn in counter clock wise order (or we won't see what is inside a ball, and we don't want to see it anyway). only primitive that is facing the camera (clock wise order) is drawn.
We can turn off culling by placing the following code in the Draw( ) method just below the
GraphicsDevices.Clear( ) method.

GraphicsDevices.RenderState.CullMode = CullMode.None;

ไม่มีความคิดเห็น: