[Bind] Remove dirName

Wasn't used, always ended up as "GL2"
This commit is contained in:
Fraser Waters 2015-06-07 23:01:46 +01:00
parent e6e8b7a357
commit 72cc73f2bf
9 changed files with 34 additions and 38 deletions

View file

@ -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;

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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");

View file

@ -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)
{

View file

@ -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");

View file

@ -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";

View file

@ -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)
{