Add GE_COMP_NEVER for alpha/color test to return false.

This commit is contained in:
raven02 2013-08-28 14:33:15 +08:00
parent 61896cd00a
commit 0f55a6e042

View File

@ -62,8 +62,12 @@ static bool IsAlphaTestTriviallyTrue() {
int alphaTestMask = gstate.getAlphaTestMask();
switch (alphaTestFunc) {
case GE_COMP_NEVER:
return false;
case GE_COMP_ALWAYS:
return true;
case GE_COMP_GEQUAL:
return alphaTestRef == 0;
@ -86,18 +90,18 @@ static bool IsAlphaTestTriviallyTrue() {
case GE_COMP_LEQUAL:
return alphaTestRef == 255;
default:
return false;
}
}
static bool IsColorTestTriviallyTrue() {
GEComparison colorTestFunc = gstate.getColorTestFunction();
switch (colorTestFunc) {
case GE_COMP_NEVER:
return false;
case GE_COMP_ALWAYS:
return true;
default:
return false;
}
}