Sign in to follow this  
enigmatix

[DX9] - Rendering Primitives Always On Top

Recommended Posts

I've been trying to figure out how to render certain primitives on top of other primitives if they are in the same spot. For example, I have two triangles with edges that share the same position. So if i render them as a wireframe, one overlaps the other. I want to be able to choose which triangle would appear on top. How can I accomplish this? Does it mean I have to rearrange the primitives in the vertex buffer?

Share this post


Link to post
Share on other sites
Hi,that's why we have a depth buffer.
It's a buffer also called Z-buffer which stores information about object distance from the viewing point.Object's that are closer to the viewing point will occlude those that are not so close.

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