2007-09-02 22:52:00 +00:00
|
|
|
|
#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
|
|
|
|
{
|
2008-02-02 00:58:26 +00:00
|
|
|
|
string enumSpecAux;// = "GL2\\enum.spec";
|
2007-10-26 12:57:47 +00:00
|
|
|
|
|
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
|
|
|
|
|
{
|
2008-02-02 00:58:26 +00:00
|
|
|
|
//Settings.OutputNamespace = "OpenTK.Graphics.OpenGL";
|
2007-09-02 07:50:46 +00:00
|
|
|
|
}
|
2007-11-04 15:24:22 +00:00
|
|
|
|
|
|
|
|
|
Settings.CompleteEnumName = "AllGlu";
|
2007-09-02 07:50:46 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
public override void Process()
|
|
|
|
|
{
|
|
|
|
|
Bind.Structures.Type.Initialize(glTypemap, csTypemap);
|
2007-10-26 12:57:47 +00:00
|
|
|
|
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...");
|
2007-11-10 10:26:04 +00:00
|
|
|
|
//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
|
|
|
|
}
|
|
|
|
|
}
|