Jump to content
  • Advertisement
Sign in to follow this  
giugio

meshes front and back and fvf

This topic is 3676 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!