Sign in to follow this  
giugio

meshes front and back and fvf

Recommended Posts

Hy. I'm created some mesh ,and in front all work fine ,but when i rotate the mesh the back appear bad. Why? ANd i use D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1; for fvf mesh. so if i try this format :D3DFVF_XYZ | D3DFVF_NORMAL without tex i get error when i set the vertexes

Share this post


Link to post
Share on other sites
the back faces appear invisible when for sample i rotate the model :
in the front all work fine , but when the rotation reach a back face the face become invisible.
Thanks.

Share this post


Link to post
Share on other sites
Remember to help us to help you - "appears bad" isn't much for us to work with. If we have to guess your question it's quite likely that the answer will be wrong [wink]

Sounds to be like a back-face culling / "winding order" issue. Try setting D3DRS_CULLMODE to be D3DCULL_NONE and I'd imagine it'll go away. Likewise, setting the same state to D3DCULL_CW you'll find the problem inverted - can't see the front, but can see the back.

The proper solution is to reorder the vertices/indices so that all triangles in an individual draw call share the same winding order - all clockwise or all anti-clockwise.


hth
Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this