public static void Main(string[] args) { XmlSpecParser xmlParser = new XmlSpecParser(); DotNetTranslator translator = new DotNetTranslator(); DotNetFileWriter writer = new DotNetFileWriter(); var glSpec = xmlParser.Parse(@"specs\gl.xml", @"specs\gl.overrides.xml", new XmlSpecParser.Options() { Prefix = "gl", }); XmlSerializer.WriteToFile(glSpec, "glSpecData.xml"); var glCommands = glSpec.Features.Where(x => x.Api == "gl" && (x.VersionMajor <= 3 || (x.VersionMajor == 4 && x.VersionMinor <= 5))).SelectMany(x => x.Commands); var glApi = translator.Translate(glSpec, new DotNetTranslator.Options() { Prefix = "gl", CommandFilter = x => glCommands.Contains(x.Name) }); XmlSerializer.WriteToFile(glApi, "glDotNetData.xml"); writer.WriteFiles(glApi, new DotNetFileWriter.Options() { Prefix = "GL", OutputPath = @"..\..\..\GLDotNet.GL\", Namespace = "GLDotNet.GL", ConstantsFileName = "GLContext.Constants.Generated.cs", EnumsFileName = "GLEnums.Generated.cs", FunctionsFileName = "GLFunctions.Generated.cs", FunctionsClassName = "GLFunctions", ContextFileName = "GLContext.Generated.cs", ContextClassName = "GLContext" }); }
public static void Main(string[] args) { XmlSpecParser xmlParser = new XmlSpecParser(); DotNetTranslator translator = new DotNetTranslator(); DotNetFileWriter writer = new DotNetFileWriter(); var glSpec = xmlParser.Parse(@"specs\gl.xml", @"specs\gl.overrides.xml", new XmlSpecParser.Options() { Prefix = "gl", }); //XmlSerializer.WriteToFile(glSpec, "glSpecData.xml"); WriteGL(glSpec, translator, writer); WriteGLVersions(glSpec, translator, writer); }