   [DX9] - Rendering Primitives Always On Top
  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?   
  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.