I’m working on a program that loads an .ase file (3DS MAX ASCII export format) and then display it.
The problem is that the depth test is not working properly.
For example, for a ship, there are reactors, cockpit, wings… When i draw it, i always see the reactors, even if there is something in front of them. Idem for the others stuffs.
In my program, i clear the depth buffer each time i draw, i’ve enabled the depth test, ans set the depth function. I’ve althought tried the culling but the result is the same.
So what is the problem ? Must i sort triangles before displaying ?
Thanks to help me.