Slimdx Direct3d9 Model skewing

Started by
2 comments, last by fkhan 13 years, 9 months ago
I am writing a collada model viewer and have been using the BasicEffect.fx from XNA. The model I am trying to render is of a dice(cube) which renders fine only that it is skewed and looks like a trapezium. It renders fine if I use a different effect file.
Advertisement
Here is the screenshot of the model
https://docs.google.com/leaf?id=0BwVB_dthrIq6MTYxMDU3MDgtYmY4YS00MzM5LWI4NDMtZjc3YTQ5Y2E5ZjBk&hl=en
Its not skewed.

Your triangle winding order is opposite of your back-face culling mode.

Have a look at renderstates and d3drs_cullmode in particular.

You are seeing the inside of the cube as if the outside faces were see-through.
Right on steve! How could you ever tell that was from culling?
Just had to set cullmode in render loop.

To save debugging time for others, here's the code
device.SetRenderState(RenderState.CullMode, true);

This topic is closed to new replies.

Advertisement