public void SaveAsCode(CodeDomProvider provider, GLSLAssembly assembly, IGLSLUniformExtractor extractor, CodeGeneratorOptions options) { string outputFile = System.IO.Path.GetFileNameWithoutExtension(assembly.OutputAssembly) + ".cs"; string absolutePath = System.IO.Path.Combine(assembly.Path, outputFile); using (var fs = File.OpenWrite(absolutePath)) using (var writer = new StreamWriter(fs)) { var contentUnit = InitialiseCompileUnit(assembly); provider.GenerateCodeFromCompileUnit(contentUnit, writer, options); } }
public GLSLStructGenerator(IGLSLUniformExtractor extractor) { mExtractor = extractor; }
public void SaveAsCode(CodeDomProvider provider, GLSLAssembly assembly, IGLSLUniformExtractor extractor, CodeGeneratorOptions options) { string outputFile = System.IO.Path.GetFileNameWithoutExtension (assembly.OutputAssembly) + ".cs"; string absolutePath = System.IO.Path.Combine(assembly.Path,outputFile); using (var fs = File.OpenWrite (absolutePath)) using (var writer = new StreamWriter(fs)) { var contentUnit = InitialiseCompileUnit (assembly); provider.GenerateCodeFromCompileUnit (contentUnit, writer, options); } }