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