Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1452 | chris | 1 | #region --- License --- |
| 2 | /* Copyright (c) 2006, 2007 Stefanos Apostolopoulos |
||
| 3 | * See license.txt for license info |
||
| 4 | */ |
||
| 5 | #endregion |
||
| 6 | |||
| 7 | using System.Diagnostics; |
||
| 8 | using Bind.Structures; |
||
| 9 | |||
| 10 | namespace Bind.Glx |
||
| 11 | { |
||
| 12 | class Generator : GL2.Generator |
||
| 13 | { |
||
| 14 | #region --- Constructors --- |
||
| 15 | |||
| 16 | public Generator() |
||
| 17 | : base() |
||
| 18 | { |
||
| 19 | glTypemap = "Glx\\glx.tm"; |
||
| 20 | csTypemap = "csharp.tm"; |
||
| 21 | enumSpec = "Glx\\glxenum.spec"; |
||
| 22 | enumSpecExt = "Glx\\glxenumext.spec"; |
||
| 23 | glSpec = "Glx\\glx.spec"; |
||
| 24 | glSpecExt = "Glx\\glxext.spec"; |
||
| 25 | |||
| 26 | importsFile = "GlxCore.cs"; |
||
| 27 | delegatesFile = "GlxDelegates.cs"; |
||
| 28 | enumsFile = "GlxEnums.cs"; |
||
| 29 | wrappersFile = "Glx.cs"; |
||
| 30 | |||
| 31 | Settings.OutputClass = "Glx"; |
||
| 32 | Settings.FunctionPrefix = "glX"; |
||
| 33 | Settings.ConstantPrefix = "GLX_"; |
||
| 34 | |||
| 35 | |||
| 36 | if (Settings.Compatibility == Settings.Legacy.Tao) |
||
| 37 | { |
||
| 38 | Settings.OutputNamespace = "Tao.Platform.Glx"; |
||
| 39 | //Settings.WindowsGDI = "Tao.Platform.Windows.Gdi"; |
||
| 40 | } |
||
| 41 | else |
||
| 42 | { |
||
| 43 | Settings.OutputNamespace = "OpenTK.Platform.X11"; |
||
| 44 | } |
||
| 45 | } |
||
| 46 | |||
| 47 | #endregion |
||
| 48 | |||
| 49 | public override void Process() |
||
| 50 | { |
||
| 51 | Type.Initialize(glTypemap, csTypemap); |
||
| 52 | Enum.Initialize(enumSpec, enumSpecExt); |
||
| 53 | Function.Initialize(); |
||
| 54 | Delegate.Initialize(glSpec, glSpecExt); |
||
| 55 | |||
| 56 | // Process enums and delegates - create wrappers. |
||
| 57 | Trace.WriteLine("Processing specs, please wait..."); |
||
| 58 | //this.Translate(); |
||
| 59 | |||
| 60 | WriteBindings( |
||
| 61 | Delegate.Delegates, |
||
| 62 | Function.Wrappers, |
||
| 63 | Enum.GLEnums); |
||
| 64 | } |
||
| 65 | } |
||
| 66 | } |