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