Jump to content
  • Advertisement
Sign in to follow this  
TheSkyline13

[solved] Back Triangles Rendering on Front

This topic is 2914 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'm trying to get a model to render using the Directx libraries but I'm having troubles when it's rendering a model. All the triangles at the back that are facing the camera are being rendered on top of the closer triangles. I'm rendering the vertex buffer using DrawIndexedUserPrimitives and its a trianglestrip.

http://img801.imageshack.us/img801/886/renderqp.png

I don't have any cullmode set, and even when I set it, no matter what it still shows up like that.

[Edited by - TheSkyline13 on September 27, 2010 11:37:21 AM]

Share this post


Link to post
Share on other sites
Advertisement

If your depth buffer is set up correctly, the next usual suspect would be using 0 for the near clipping plane distance when creating your projection matrix. This will effectively look the same as not having depth buffering enabled at all. To fix this, use another small value like 0.01f for your near clipping plane instead of 0.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!