protected static bool ParseDepthFunc( string parameters, MaterialScriptContext context )
{
// lookup the real enum equivalent to the script value
object val = ScriptEnumAttribute.Lookup( parameters, typeof( CompareFunction ) );
// if a value was found, assign it
if ( val != null )
{
context.pass.DepthFunction = (CompareFunction)val;
}
else
{
string legalValues = ScriptEnumAttribute.GetLegalValues( typeof( CompareFunction ) );
LogParseError( context, "Bad depth_func attribute, valid parameters are {0}.", legalValues );
}
return false;
}