Opentk/Source/Bind/Glu/Generator.cs

71 lines
2 KiB
C#
Raw Normal View History

#region --- License ---
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
* See license.txt for license info
*/
#endregion
using System;
2007-09-02 02:58:10 +02:00
using System.Collections.Generic;
using System.Text;
2007-09-02 09:50:46 +02:00
using System.Diagnostics;
using System.IO;
2007-09-02 02:58:10 +02:00
namespace Bind.Glu
{
2007-09-02 09:50:46 +02:00
class Generator : Bind.GL2.Generator
2007-09-02 02:58:10 +02:00
{
string enumSpecAux = "GL2\\enum.spec";
2007-09-02 09:50:46 +02:00
#region --- Constructors ---
public Generator()
: base()
{
glTypemap = "Glu\\glu.tm";
csTypemap = "csharp.tm";
enumSpec = "Glu\\enumglu.spec";
enumSpecExt = "";
glSpec = "Glu\\glu.spec";
glSpecExt = "";
importsFile = "GluCore.cs";
delegatesFile = "GluDelegates.cs";
enumsFile = "GluEnums.cs";
wrappersFile = "Glu.cs";
Settings.OutputClass = "Glu";
Settings.FunctionPrefix = "glu";
Settings.ConstantPrefix = "GLU_";
if (Settings.Compatibility == Settings.Legacy.Tao)
{
Settings.OutputNamespace = "Tao.OpenGl";
//Settings.WindowsGDI = "Tao.Platform.Windows.Gdi";
}
else
{
Settings.OutputNamespace = "OpenTK.OpenGL";
}
}
#endregion
public override void Process()
{
Bind.Structures.Type.Initialize(glTypemap, csTypemap);
Bind.Structures.Enum.Initialize(enumSpec, enumSpecExt, enumSpecAux);
2007-09-02 09:50:46 +02:00
Bind.Structures.Function.Initialize();
Bind.Structures.Delegate.Initialize(glSpec, glSpecExt);
// Process enums and delegates - create wrappers.
Trace.WriteLine("Processing specs, please wait...");
this.Translate();
this.WriteBindings(
Bind.Structures.Delegate.Delegates,
Bind.Structures.Function.Wrappers,
Bind.Structures.Enum.GLEnums);
}
2007-09-02 02:58:10 +02:00
}
}