Fix another culling bug
This commit is contained in:
parent
dfd1393dba
commit
2c2f1a4c9f
8 changed files with 130 additions and 15 deletions
|
@ -82,4 +82,10 @@ int _LCR_strCmp(const char *s1, const char *s2)
|
|||
return 1;
|
||||
}
|
||||
|
||||
char _LCR_triangleWinding(int x0, int y0, int x1, int y1, int x2, int y2)
|
||||
{
|
||||
x0 = (y1 - y0) * (x2 - x1) - (x1 - x0) * (y2 - y1);
|
||||
return x0 != 0 ? (x0 > 0 ? 1 : -1) : 0;
|
||||
}
|
||||
|
||||
#endif // guard
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue