Hi:

I create a Mesh from scratch (thanks Clootie for the link), namely a fractal world. It's very basic mesh : a grid (x,y coordinates), with a different height (z) for each point, and then 2 triangles to render each quad. I kept it as simple as possible.

When I render it, some faces that should be hidden by others are still visible. It's as if DirectX did not manage to properly order the faces to render.

Here is an image link as an illustration (B&W stripes to better see the volume):
http://arnaud.debruyn.info/images/di...sh_problem.gif

A few things I noted:

1. It only happens in certains views (see above link: left image is fine, right one is not), probably due to the initial ordering of the vertex.

2. Let's say I have 3 faces: A > B > C, where > means 'in front of'. It seems that in that case, C is always correctly hidden, but B might sometimes be rendered in front of A.

Any idea what happens? Where should I look? Can it be because the mesh is too complex (4225 vertex, 8192 faces)?

Thanks,
Arnaud.[/url]