diff --git a/Source/Bind/CL/CLGenerator.cs b/Source/Bind/CL/CLGenerator.cs index 29ad934f..42dca49e 100644 --- a/Source/Bind/CL/CLGenerator.cs +++ b/Source/Bind/CL/CLGenerator.cs @@ -11,8 +11,8 @@ namespace Bind.CL { class CLGenerator : ES.ESGenerator { - public CLGenerator(Settings settings, string dirname) - : base(settings, dirname) + public CLGenerator(Settings settings) + : base(settings) { glTypemap = null; diff --git a/Source/Bind/ES/ES2Generator.cs b/Source/Bind/ES/ES2Generator.cs index e54f37d4..514732ef 100644 --- a/Source/Bind/ES/ES2Generator.cs +++ b/Source/Bind/ES/ES2Generator.cs @@ -12,8 +12,8 @@ namespace Bind.ES // Generation implementation for OpenGL ES 2.0 and 3.0 class ES2Generator : Generator { - public ES2Generator(Settings settings, string dirName) - : base(settings, dirName) + public ES2Generator(Settings settings) + : base(settings) { Settings.DefaultOutputPath = Path.Combine( Settings.DefaultOutputPath, "../ES20"); diff --git a/Source/Bind/ES/ES31Generator.cs b/Source/Bind/ES/ES31Generator.cs index 4e2167de..326e321a 100644 --- a/Source/Bind/ES/ES31Generator.cs +++ b/Source/Bind/ES/ES31Generator.cs @@ -12,8 +12,8 @@ namespace Bind.ES // Generation implementation for OpenGL ES 3.1 class ES31Generator : Generator { - public ES31Generator(Settings settings, string dirName) - : base(settings, dirName) + public ES31Generator(Settings settings) + : base(settings) { Settings.DefaultOutputPath = Path.Combine( Settings.DefaultOutputPath, "../ES31"); diff --git a/Source/Bind/ES/ES3Generator.cs b/Source/Bind/ES/ES3Generator.cs index e2dce041..d93304e8 100644 --- a/Source/Bind/ES/ES3Generator.cs +++ b/Source/Bind/ES/ES3Generator.cs @@ -12,8 +12,8 @@ namespace Bind.ES // Generation implementation for OpenGL ES 3.0 class ES3Generator : Generator { - public ES3Generator(Settings settings, string dirName) - : base(settings, dirName) + public ES3Generator(Settings settings) + : base(settings) { Settings.DefaultOutputPath = Path.Combine( Settings.DefaultOutputPath, "../ES30"); diff --git a/Source/Bind/ES/ESGenerator.cs b/Source/Bind/ES/ESGenerator.cs index c3a50883..fa472d31 100644 --- a/Source/Bind/ES/ESGenerator.cs +++ b/Source/Bind/ES/ESGenerator.cs @@ -12,8 +12,8 @@ namespace Bind.ES // Generator implementation for OpenGL ES 1.0 and 1.1 class ESGenerator : Generator { - public ESGenerator(Settings settings, string dirName) - : base(settings, dirName) + public ESGenerator(Settings settings) + : base(settings) { Settings.DefaultOutputPath = Path.Combine( Settings.DefaultOutputPath, "../ES11"); diff --git a/Source/Bind/GL2/GL2Generator.cs b/Source/Bind/GL2/GL2Generator.cs index 7e36c024..26e0fe92 100644 --- a/Source/Bind/GL2/GL2Generator.cs +++ b/Source/Bind/GL2/GL2Generator.cs @@ -35,8 +35,8 @@ namespace Bind.GL2 class GL2Generator : Generator { - public GL2Generator(Settings settings, string dirname) - : base(settings, dirname) + public GL2Generator(Settings settings) + : base(settings) { if (Settings.Compatibility == Settings.Legacy.Tao) { diff --git a/Source/Bind/GL2/GL4Generator.cs b/Source/Bind/GL2/GL4Generator.cs index a9b6c740..b5130ea1 100644 --- a/Source/Bind/GL2/GL4Generator.cs +++ b/Source/Bind/GL2/GL4Generator.cs @@ -35,8 +35,8 @@ namespace Bind.GL2 { class GL4Generator : Generator { - public GL4Generator(Settings settings, string dirname) - : base(settings, dirname) + public GL4Generator(Settings settings) + : base(settings) { Settings.DefaultOutputPath = Path.Combine( Settings.DefaultOutputPath, "../OpenGL4"); diff --git a/Source/Bind/GL2/Generator.cs b/Source/Bind/GL2/Generator.cs index baa35dc2..6da30cd5 100644 --- a/Source/Bind/GL2/Generator.cs +++ b/Source/Bind/GL2/Generator.cs @@ -60,21 +60,19 @@ namespace Bind.GL2 #region Constructors - public Generator(Settings settings, string dirName) + public Generator(Settings settings) { if (settings == null) throw new ArgumentNullException("settings"); - if (dirName == null) - dirName = "GL2"; Settings = settings.Clone(); glTypemap = "GL2/gl.tm"; csTypemap = Settings.LanguageTypeMapFile; - enumSpec = Path.Combine(dirName, "signatures.xml"); + enumSpec = Path.Combine("GL2", "signatures.xml"); enumSpecExt = String.Empty; - glSpec = Path.Combine(dirName, "signatures.xml"); + glSpec = Path.Combine("GL2", "signatures.xml"); glSpecExt = String.Empty; Settings.ImportsClass = "Core"; diff --git a/Source/Bind/Main.cs b/Source/Bind/Main.cs index 01ef3dd9..5a5e305a 100644 --- a/Source/Bind/Main.cs +++ b/Source/Bind/Main.cs @@ -52,9 +52,7 @@ namespace Bind Assembly.GetExecutingAssembly().GetName().Version.ToString()); Console.WriteLine("For comments, bugs and suggestions visit http://github.com/opentk/opentk"); Console.WriteLine(); - - string dirName = "GL2"; - + try { var split = new Regex(@"-\w+", RegexOptions.Compiled); @@ -83,7 +81,7 @@ namespace Bind case "mode": { string arg = val.ToLower(); - SetGeneratorMode(dirName, arg); + SetGeneratorMode(arg); break; } case "namespace": @@ -154,45 +152,45 @@ namespace Bind case GeneratorMode.All: Console.WriteLine("Using 'all' generator mode."); Console.WriteLine("Use '-mode:all/gl2/gl4/es10/es11/es20/es30/es31' to select a specific mode."); - Generators.Add(new GL2Generator(Settings, dirName)); - Generators.Add(new GL4Generator(Settings, dirName)); - Generators.Add(new ESGenerator(Settings, dirName)); - Generators.Add(new ES2Generator(Settings, dirName)); - Generators.Add(new ES3Generator(Settings, dirName)); - Generators.Add(new ES31Generator(Settings, dirName)); + Generators.Add(new GL2Generator(Settings)); + Generators.Add(new GL4Generator(Settings)); + Generators.Add(new ESGenerator(Settings)); + Generators.Add(new ES2Generator(Settings)); + Generators.Add(new ES3Generator(Settings)); + Generators.Add(new ES31Generator(Settings)); break; case GeneratorMode.GL2: - Generators.Add(new GL2Generator(Settings, dirName)); + Generators.Add(new GL2Generator(Settings)); break; case GeneratorMode.GL3: case GeneratorMode.GL4: - Generators.Add(new GL4Generator(Settings, dirName)); + Generators.Add(new GL4Generator(Settings)); break; case GeneratorMode.ES10: - Generators.Add(new ESGenerator(Settings, dirName)); + Generators.Add(new ESGenerator(Settings)); break; case GeneratorMode.ES11: - Generators.Add(new ESGenerator(Settings, dirName)); + Generators.Add(new ESGenerator(Settings)); break; case GeneratorMode.ES20: - Generators.Add(new ES2Generator(Settings, dirName)); + Generators.Add(new ES2Generator(Settings)); break; case GeneratorMode.ES30: - Generators.Add(new ES3Generator(Settings, dirName)); + Generators.Add(new ES3Generator(Settings)); break; case GeneratorMode.ES31: - Generators.Add(new ES31Generator(Settings, dirName)); + Generators.Add(new ES31Generator(Settings)); break; case GeneratorMode.CL10: - Generators.Add(new CLGenerator(Settings, dirName)); + Generators.Add(new CLGenerator(Settings)); break; default: @@ -234,7 +232,7 @@ namespace Bind } } - private static void SetGeneratorMode(string dirName, string arg) + private static void SetGeneratorMode(string arg) { switch (arg) {