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