2009-09-03 19:01:11 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Xml.XPath;
|
|
|
|
|
using Bind.GL2;
|
|
|
|
|
using Bind.Structures;
|
|
|
|
|
using Delegate=Bind.Structures.Delegate;
|
|
|
|
|
using Enum=Bind.Structures.Enum;
|
|
|
|
|
|
|
|
|
|
namespace Bind.ES
|
|
|
|
|
{
|
|
|
|
|
class ESGenerator : Generator
|
|
|
|
|
{
|
|
|
|
|
public ESGenerator(string nsName, string dirName)
|
|
|
|
|
{
|
|
|
|
|
if (String.IsNullOrEmpty(nsName))
|
|
|
|
|
throw new ArgumentNullException("nsName");
|
|
|
|
|
if (dirName == null)
|
|
|
|
|
dirName = nsName;
|
|
|
|
|
|
|
|
|
|
glTypemap = "GL2/gl.tm";
|
|
|
|
|
csTypemap = "csharp.tm";
|
|
|
|
|
|
|
|
|
|
enumSpec = dirName + "/signatures.xml";
|
|
|
|
|
enumSpecExt = String.Empty;
|
|
|
|
|
glSpec = dirName + "/signatures.xml";
|
|
|
|
|
glSpecExt = String.Empty;
|
|
|
|
|
functionOverridesFile = dirName + "/overrides.xml";
|
|
|
|
|
|
|
|
|
|
importsFile = "Core.cs";
|
|
|
|
|
delegatesFile = "Delegates.cs";
|
|
|
|
|
enumsFile = "Enums.cs";
|
|
|
|
|
wrappersFile = "ES.cs";
|
|
|
|
|
Settings.ImportsClass = "Core";
|
|
|
|
|
Settings.DelegatesClass = "Delegates";
|
|
|
|
|
|
|
|
|
|
Settings.OutputClass = "GL";
|
|
|
|
|
Settings.OutputNamespace = "OpenTK.Graphics." + nsName;
|
|
|
|
|
Settings.OutputPath = Path.Combine(Settings.OutputPath, dirName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|