protected static bool ParseFragmentProgram( string parameters, MaterialScriptContext context )
{
// update section
context.section = MaterialScriptSection.Program;
// create new program definition-in-progress
context.programDef = new MaterialScriptProgramDefinition();
context.programDef.progType = GpuProgramType.Fragment;
context.programDef.supportsSkeletalAnimation = false;
context.programDef.supportsMorphAnimation = false;
context.programDef.poseAnimationCount = 0;
// get name and language code
string[] values = parameters.Split( new char[] { ' ', '\t' } );
if ( values.Length != 2 )
{
LogParseError( context, "Invalid fragment_program entry - expected 2 parameters." );
return true;
}
// name, preserve case
context.programDef.name = values[ 0 ];
// language code, make lower case
context.programDef.language = values[ 1 ].ToLower();
// return true, because this must be followed by a {
return true;
}