Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Z problem !!!

This topic is 6187 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

I''ve tried to load a mesh and then rotate it using SetTransform D3DTS_WORLTRANSFORM, it rotate well, but my mesh seems had been drawn the wrong way as the back showing up front. I''ve tried messing around with a variety of RenderState but the problem remains. What should I do ??

Share this post

Link to post
Share on other sites
Try changing the D3DRS_CULLMODE from D3DCULL_CCW to D3DCULL_CW.

The winding order of your vertices may be counterclockwise whereas it should be clockwise.

Alternatively your Z buffer may be having problems:

a) make sure the distance between the near and far clipping plane is something sensible (i.e. we use about far-near=4000 for most things). If it isn''t you''ll be getting artifacts from the Z buffer.

b) Make sure your Clear() call has the flag enabled to clear the Z buffer as well as the frame buffer.


Simon O''''Connor
Creative Asylum Ltd

Share this post

Link to post
Share on other sites

  • 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!