Disabled all generator modes other than OpenGL.

This commit is contained in:
the_fiddler 2009-03-25 19:41:10 +00:00
parent c3e1cb9ac8
commit 4a80a6dbd7

View file

@ -28,7 +28,7 @@ namespace Bind
static class MainClass static class MainClass
{ {
static GeneratorMode mode; static GeneratorMode mode = GeneratorMode.GL2;
static internal IBind Generator; static internal IBind Generator;
@ -70,15 +70,10 @@ namespace Bind
break; break;
case "mode": case "mode":
string arg = b[1].ToLower(); string arg = b[1].ToLower();
mode = if (arg.StartsWith("gl"))
arg == "gl" ? GeneratorMode.GL2 : mode = GeneratorMode.GL2;
arg == "gl2" ? GeneratorMode.GL2 : else
arg == "gl3" ? GeneratorMode.GL3 : throw new NotImplementedException();
arg == "wgl" ? GeneratorMode.Wgl :
arg == "glu" ? GeneratorMode.Glu :
arg == "glx" ? GeneratorMode.Glx : GeneratorMode.Unknown;
if (mode == GeneratorMode.Unknown)
throw new ArgumentException(String.Format("Mode {0} unknown.", arg));
break; break;
case "namespace": case "namespace":
case "ns": case "ns":
@ -179,7 +174,7 @@ namespace Bind
private static void ShowHelp() private static void ShowHelp()
{ {
Console.WriteLine( Console.WriteLine(
@"Usage: bind -mode:[gl/gl2/gl3/glu/wgl/glx] [switches] @"Usage: bind [-in:path] [-out:path] [switches]
Available switches: Available switches:
-in: Input directory (e.g. -in:../specs/) -in: Input directory (e.g. -in:../specs/)
-out: Output directory (e.g. -out:out) -out: Output directory (e.g. -out:out)
@ -192,8 +187,6 @@ Available switches:
-o:tao Tao compatibility mode. -o:tao Tao compatibility mode.
-o:enums Follow OpenGL instead .Net naming conventions. -o:enums Follow OpenGL instead .Net naming conventions.
-o:safe Do not generate public unsafe functions. -o:safe Do not generate public unsafe functions.
-o:permutations
Generate all possible parameter permutations.
-o:enums_in_class -o:enums_in_class
Place enums in a nested class (i.e. GL.Enums) Place enums in a nested class (i.e. GL.Enums)
instead of a namespace (i.e. OpenTK.Graphics.OpenGL.Enums) instead of a namespace (i.e. OpenTK.Graphics.OpenGL.Enums)