Sign in to follow this  
TheSkyline13

[solved] Back Triangles Rendering on Front

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this