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

ParseProgramCustomParameter() защищенный статический Метод

Parse custom GPU program parameters.
This one is called explicitly, and is not added to any parser list.
protected static ParseProgramCustomParameter ( string parameters, MaterialScriptContext context ) : bool
parameters string
context MaterialScriptContext
Результат bool
		protected static bool ParseProgramCustomParameter( string parameters, MaterialScriptContext context )
		{
			// This params object does not have the command stripped
			// Lower case the command, but not the value incase it's relevant
			// Split only up to first delimiter, program deals with the rest
			string[] values = StringConverter.Split( parameters, new char[] { ' ', '\t' }, 2 );

			if ( values.Length != 2 )
			{
				LogParseError( context, "Invalid custom program parameter entry; there must be a parameter name and at least one value." );
				return false;
			}

			context.programDef.customParameters.Add( new KeyValuePair<string, string>( values[ 0 ], values[ 1 ] ) );

			return false;
		}