quote:
When I get verticies like these:
-1, 0.5, 1 (A)
-0.5, 0.5, 1 (B)
-0.5, 0.5, -1 (C)
-1, 0.5, -1 (D)
And I order them, it does come out to
A B
C D
The vertex ordering is flawed.
Note that if we read in the vertices (x,y,z), the ones youve produced up there will be:
A--------B
|*******|
|*******|
D--------C
And thats where the problem lies..... the two triangles overlap..... moreover DX draws vertices anticlockwise, which means the first triangle wont draw at all.
For the order youve shown above try the two below
IB = { A,D,B,B,D,C }
The above one works if its anticlockwise ordering
The one below if its clockwise ordering
IB = { A,B,D, D,B,C }
Try em both....
Prasan
[edited by - psamty10 on February 8, 2004 12:18:36 AM]
[edited by - psamty10 on February 8, 2004 12:19:05 AM]