Axiom.Serialization.MaterialSerializer.ParseDepthFunc C# (CSharp) Метод

ParseDepthFunc() приватный Метод

private ParseDepthFunc ( string parameters, MaterialScriptContext context ) : bool
parameters string
context MaterialScriptContext
Результат bool
		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;
		}