Opentk/Source/Bind/Glu/Generator.cs

73 lines
2.1 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 00:58:10 +00:00
using System.Collections.Generic;
using System.Text;
2007-09-02 07:50:46 +00:00
using System.Diagnostics;
using System.IO;
2007-09-02 00:58:10 +00:00
namespace Bind.Glu
{
2007-09-02 07:50:46 +00:00
class Generator : Bind.GL2.Generator
2007-09-02 00:58:10 +00:00
{
string enumSpecAux;// = "GL2\\enum.spec";
2007-09-02 07:50:46 +00: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.Graphics.OpenGL";
2007-09-02 07:50:46 +00:00
}
Settings.CompleteEnumName = "AllGlu";
2007-09-02 07:50:46 +00:00
}
#endregion
public override void Process()
{
Bind.Structures.Type.Initialize(glTypemap, csTypemap);
Bind.Structures.Enum.Initialize(enumSpec, enumSpecExt, enumSpecAux);
2007-09-02 07:50:46 +00: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();
2007-09-02 07:50:46 +00:00
this.WriteBindings(
Bind.Structures.Delegate.Delegates,
Bind.Structures.Function.Wrappers,
Bind.Structures.Enum.GLEnums);
}
2007-09-02 00:58:10 +00:00
}
}