Added support for CONSTANT_COLOR and ONE_MINUS_CONSTANT_COLOR into .osg

This commit is contained in:
Robert Osfield 2004-09-01 09:00:20 +00:00
parent 6483c8f78b
commit da6993fc77

View File

@ -85,6 +85,8 @@ bool BlendFunc_matchModeStr(const char* str,int& mode)
else if (strcmp(str,"ZERO")==0) mode = BlendFunc::ZERO;
else if (strcmp(str,"CONSTANT_ALPHA")==0) mode = BlendFunc::CONSTANT_ALPHA;
else if (strcmp(str,"ONE_MINUS_CONSTANT_ALPHA")==0) mode = BlendFunc::ONE_MINUS_CONSTANT_ALPHA;
else if (strcmp(str,"CONSTANT_COLOR")==0) mode = BlendFunc::CONSTANT_COLOR;
else if (strcmp(str,"ONE_MINUS_CONSTANT_COLOR")==0) mode = BlendFunc::ONE_MINUS_CONSTANT_COLOR;
else return false;
return true;
@ -107,6 +109,8 @@ const char* BlendFunc_getModeStr(int value)
case(BlendFunc::ZERO) : return "ZERO";
case(BlendFunc::CONSTANT_ALPHA) : return "CONSTANT_ALPHA";
case(BlendFunc::ONE_MINUS_CONSTANT_ALPHA): return "ONE_MINUS_CONSTANT_ALPHA";
case(BlendFunc::CONSTANT_COLOR) : return "CONSTANT_COLOR";
case(BlendFunc::ONE_MINUS_CONSTANT_COLOR): return "ONE_MINUS_CONSTANT_COLOR";
}
return NULL;