diff --git a/Source/Bind/GL2/Generator.cs b/Source/Bind/GL2/Generator.cs index 6f5568de..9b29d553 100644 --- a/Source/Bind/GL2/Generator.cs +++ b/Source/Bind/GL2/Generator.cs @@ -615,19 +615,19 @@ namespace Bind.GL2 sw.WriteLine("{"); sw.Indent(); sw.WriteLine(); - sw.WriteLine("internal static class {0}", Settings.DelegatesClass); + sw.WriteLine("internal static partial class {0}", Settings.DelegatesClass); sw.WriteLine("{"); sw.Indent(); // Disable BeforeFieldInit - sw.WriteLine("static {0}()", Settings.DelegatesClass); - sw.WriteLine("{"); + //sw.WriteLine("static {0}()", Settings.DelegatesClass); + //sw.WriteLine("{"); // --- Workaround for mono gmcs 1.2.4 issue, where static initalization fails. --- //sw.Indent(); //sw.WriteLine("{0}.{1}();", Settings.OutputClass, loadAllFuncName); //sw.Unindent(); // --- End workaround --- - sw.WriteLine("}"); + //sw.WriteLine("}"); sw.WriteLine(); foreach (Bind.Structures.Delegate d in delegates.Values) { @@ -660,11 +660,10 @@ namespace Bind.GL2 sw.WriteLine("{"); sw.Indent(); sw.WriteLine(); - sw.WriteLine("internal static class {0}", Settings.ImportsClass); + sw.WriteLine("internal static partial class {0}", Settings.ImportsClass); sw.WriteLine("{"); - sw.Indent(); - sw.WriteLine("static {0}() {1} {2}", Settings.ImportsClass, "{", "}"); // Disable BeforeFieldInit + //sw.WriteLine("static {0}() {1} {2}", Settings.ImportsClass, "{", "}"); // Disable BeforeFieldInit sw.WriteLine(); foreach (Bind.Structures.Delegate d in delegates.Values) { diff --git a/Source/Bind/Main.cs b/Source/Bind/Main.cs index ca3b6140..ae78d878 100644 --- a/Source/Bind/Main.cs +++ b/Source/Bind/Main.cs @@ -140,8 +140,13 @@ namespace Bind break; case GeneratorMode.GL3: - default: throw new NotImplementedException(String.Format("Mode {0} not implemented.", mode)); + + case GeneratorMode.Unknown: + default: + Console.WriteLine("Please specify a generator mode (use '-mode:gl2/gl3/glu/wgl/glx])'"); + return; + } Generator.Process(); diff --git a/Source/Bind/Structures/Function.cs b/Source/Bind/Structures/Function.cs index 58528116..6a637575 100644 --- a/Source/Bind/Structures/Function.cs +++ b/Source/Bind/Structures/Function.cs @@ -32,7 +32,7 @@ namespace Bind.Structures #endregion static Regex endings = new Regex(@"((([df]|u?[isb])v?)|v)", RegexOptions.Compiled | RegexOptions.RightToLeft); - static Regex endingsNotToTrim = new Regex("(ib|[tdre]s|[eE]n[vd])", RegexOptions.Compiled | RegexOptions.RightToLeft); + static Regex endingsNotToTrim = new Regex("(ib|[tdrey]s|[eE]n[vd])", RegexOptions.Compiled | RegexOptions.RightToLeft); /// /// Add a trailing v to functions matching this regex. Used to differntiate between overloads taking both