private static string TransformTemplate( string filePath, NumDefine[] defines, PasteToken[] attributeTypes ) { var debug = new InfoSinkBase(SinkType.String); var info = new InfoSinkBase(SinkType.String); var infoSink = new InfoSink(info, debug); var intermediate = new GLSLIntermediate(); var symbols = new SymbolLookup(); symbols.SetPreambleManually(Profile.CoreProfile); foreach (var x in defines) { symbols.DefineAs(x.Name, x.Value); } foreach (var t in attributeTypes) { symbols.AddPasteToken(t.Name, t.Value); } var preprocessor = new Standalone(infoSink, intermediate, symbols); preprocessor.Run(filePath, out string result); return(result); }