simplipie: Fix error when fixing face culling and tessellation at the same time.
parent
e5edaeabfd
commit
3d7a7b397b
|
@ -37,7 +37,7 @@ POINTS 33
|
|||
-65 97 -64
|
||||
0 97 -64
|
||||
65 97 -64
|
||||
POLYGONS 26
|
||||
POLYGONS 28
|
||||
200 3 2 1 0 199 87 199 131 194 131
|
||||
200 3 0 3 2 194 131 194 87 199 87
|
||||
200 3 6 5 4 194 131 194 87 199 87
|
||||
|
|
|
@ -114,7 +114,7 @@ POINTS 110
|
|||
0 127 -130
|
||||
65 127 -130
|
||||
65 127 -195
|
||||
POLYGONS 110
|
||||
POLYGONS 116
|
||||
200 3 3 2 1 169 71 139 71 139 41
|
||||
200 3 3 1 0 169 71 139 41 169 41
|
||||
200 3 4 5 1 79 2 48 2 79 46
|
||||
|
|
|
@ -305,6 +305,10 @@ static void dump_to_pie(FILE *ctl, FILE *fp, const char *input)
|
|||
faceList[j].index[m] = posList[faceList[j].index[m]].reindex;
|
||||
}
|
||||
facesPIE3 += faceList[j].vertices - 3; // easy tessellation
|
||||
if (faceList[j].cull)
|
||||
{
|
||||
facesPIE3 += faceList[j].vertices - 3; // must add additional face that is faced in the opposite direction also for tessellated faces
|
||||
}
|
||||
}
|
||||
|
||||
if (verbose && (facesPIE3 - faces))
|
||||
|
|
Loading…
Reference in New Issue