meshes front and back and fvf
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
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.
in the front all work fine , but when the rotation reach a back face the face become invisible.
Thanks.
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement