gfx3d: sorry, the poly sorting callback must be this way. there must be something else going wrong where this breaks
This commit is contained in:
parent
620618d22b
commit
4bbb85bb83
|
@ -1405,21 +1405,21 @@ void gfx3d_glFlush(u32 v)
|
||||||
gfx3d_doFlush();
|
gfx3d_doFlush();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int gfx3d_ysort_compare(int num1, int num2)
|
static bool gfx3d_ysort_compare(int num1, int num2)
|
||||||
{
|
{
|
||||||
const POLY &poly1 = polylist->list[num1];
|
const POLY &poly1 = polylist->list[num1];
|
||||||
const POLY &poly2 = polylist->list[num2];
|
const POLY &poly2 = polylist->list[num2];
|
||||||
|
|
||||||
if(poly1.maxy > poly2.maxy)
|
if(poly1.maxy > poly2.maxy)
|
||||||
return 1;
|
return true;
|
||||||
else if(poly1.maxy < poly2.maxy)
|
else if(poly1.maxy < poly2.maxy)
|
||||||
return -1;
|
return false;
|
||||||
else if(poly1.miny < poly2.miny)
|
else if(poly1.miny < poly2.miny)
|
||||||
return 1;
|
return true;
|
||||||
else if(poly1.miny > poly2.miny)
|
else if(poly1.miny > poly2.miny)
|
||||||
return -1;
|
return false;
|
||||||
else
|
else
|
||||||
return 0; //equal should always return false "strict weak ordering"
|
return false; //equal should always return false "strict weak ordering"
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gfx3d_doFlush()
|
static void gfx3d_doFlush()
|
||||||
|
|
Loading…
Reference in New Issue