Archived

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

Mesh Drawing Problem

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

H i, when i draw my mesh, it looks like there is not depth buffer, but i made sure the depth buffer is on with this and teh same with cull: R->SetRenderState( D3DRS_CULLMODE, D3DCULL_NONE ); R->SetRenderState( D3DRS_ZENABLE, TRUE ); mesh viewer does it perfectly but for me it looks werid. thanks

Share this post


Link to post
Share on other sites
quote:

when i draw my mesh, it looks like there is not depth buffer



You would have to be drawing more than one mesh to know if your z-buffer was even working.

_______________________________________
Understanding is a three edged sword...

Share this post


Link to post
Share on other sites
Well the mesh is rotating, so i can see that the zbuffer isnt working because the wing of my dragon would screw up the body because it is behind the body like this:

++++
+
---=======
+
++++



()

like this, if the + were the wing, and the -= were the body and the () was the viewer, the wing wuold draw over the body.

Share this post


Link to post
Share on other sites
Are you clearing the z-buffer before rendering the scene?


m_pD3DDevice->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, Color, ZBuffer, 0)


_______________________________________
Understanding is a three edged sword...


[edited by - Sean Doherty on November 8, 2003 6:30:14 PM]

Share this post


Link to post
Share on other sites