+ const string &str = conv.get();
+ if(str=="ZERO")
+ factor = ZERO;
+ else if(str=="ONE")
+ factor = ONE;
+ else if(str=="SRC_COLOR")
+ factor = SRC_COLOR;
+ else if(str=="ONE_MINUS_SRC_COLOR")
+ factor = ONE_MINUS_SRC_COLOR;
+ else if(str=="SRC_ALPHA")
+ factor = SRC_ALPHA;
+ else if(str=="ONE_MINUS_SRC_ALPHA")
+ factor = ONE_MINUS_SRC_ALPHA;
+ else if(str=="DST_COLOR")
+ factor = DST_COLOR;
+ else if(str=="ONE_MINUS_DST_COLOR")
+ factor = ONE_MINUS_DST_COLOR;
+ else if(str=="DST_ALPHA")
+ factor = DST_ALPHA;
+ else if(str=="ONE_MINUS_DST_ALPHA")
+ factor = ONE_MINUS_DST_ALPHA;
+ else if(str=="CONSTANT_COLOR")
+ factor = CONSTANT_COLOR;
+ else if(str=="ONE_MINUS_CONSTANT_COLOR")
+ factor = ONE_MINUS_CONSTANT_COLOR;
+ else if(str=="CONSTANT_ALPHA")
+ factor = CONSTANT_ALPHA;
+ else if(str=="ONE_MINUS_CONSTANT_ALPHA")
+ factor = ONE_MINUS_CONSTANT_ALPHA;
+ else
+ throw lexical_error(format("conversion of '%s' to BlendFactor", str));