2007-08-10 11:27:13 +02:00
|
|
|
#region --- License ---
|
|
|
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
|
|
|
* See license.txt for license info
|
|
|
|
*/
|
2007-07-23 02:15:18 +02:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Text;
|
|
|
|
|
2007-08-01 11:27:57 +02:00
|
|
|
namespace Bind
|
2007-07-23 02:15:18 +02:00
|
|
|
{
|
|
|
|
static class Settings
|
|
|
|
{
|
2007-08-12 18:14:23 +02:00
|
|
|
public static string InputPath = "..\\..\\..\\Source\\Bind\\Specifications";
|
2007-08-01 11:27:57 +02:00
|
|
|
public static string OutputPath = "..\\..\\..\\Source\\OpenTK\\OpenGL\\Bindings";
|
2007-07-23 02:15:18 +02:00
|
|
|
public static string OutputNamespace = "OpenTK.OpenGL";
|
2007-08-20 12:46:37 +02:00
|
|
|
|
2007-09-02 02:40:43 +02:00
|
|
|
public const string DefaultInputPath = "..\\..\\..\\Source\\Bind\\Specifications";
|
|
|
|
public const string DefaultOutputPath = "..\\..\\..\\Source\\OpenTK\\OpenGL\\Bindings";
|
|
|
|
public const string DefaultOutputNamespace = "OpenTK.OpenGL";
|
2007-08-20 12:46:37 +02:00
|
|
|
|
2007-10-21 17:48:52 +02:00
|
|
|
public static string GLClass = "GL"; // Needed by Glu for the AuxEnumsClass. Can be set through -gl:"xxx".
|
|
|
|
public static string OutputClass = "GL"; // The real output class. Can be set through -class:"xxx".
|
2007-08-20 14:25:48 +02:00
|
|
|
public static string FunctionPrefix = "gl";
|
|
|
|
public static string ConstantPrefix = "GL_";
|
|
|
|
|
2007-09-30 14:33:27 +02:00
|
|
|
// TODO: This code is too fragile.
|
2007-11-04 16:17:37 +01:00
|
|
|
// Old enums code:
|
|
|
|
public static string normalEnumsClassOverride;
|
2007-10-21 17:48:52 +02:00
|
|
|
public static string NestedEnumsClass = "Enums";
|
2007-09-30 14:33:27 +02:00
|
|
|
public static string NormalEnumsClass
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
2007-11-04 16:17:37 +01:00
|
|
|
return
|
|
|
|
normalEnumsClassOverride == null ?
|
|
|
|
String.IsNullOrEmpty(NestedEnumsClass) ? OutputClass : OutputClass + "." + NestedEnumsClass :
|
|
|
|
normalEnumsClassOverride;
|
2007-09-30 14:33:27 +02:00
|
|
|
}
|
|
|
|
}
|
2007-10-21 17:48:52 +02:00
|
|
|
|
|
|
|
public static string AuxEnumsClass
|
|
|
|
{
|
2007-10-26 14:56:03 +02:00
|
|
|
get { return GLClass + "." + NestedEnumsClass; }
|
2007-10-21 17:48:52 +02:00
|
|
|
}
|
2007-08-01 23:14:39 +02:00
|
|
|
|
2007-11-04 16:17:37 +01:00
|
|
|
public static string EnumsOutput
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
if ((Settings.Compatibility & Settings.Legacy.NestedEnums) != Settings.Legacy.None)
|
|
|
|
return OutputNamespace + "." + OutputClass + "." + NestedEnumsClass;
|
|
|
|
else
|
|
|
|
return OutputNamespace + "." + EnumsNamespace;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public static string EnumsAuxOutput
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
if ((Settings.Compatibility & Settings.Legacy.NestedEnums) != Settings.Legacy.None)
|
|
|
|
return OutputNamespace + "." + GLClass + "." + NestedEnumsClass;
|
|
|
|
else
|
|
|
|
return OutputNamespace + "." + EnumsNamespace;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// New enums namespace (no nested class).
|
|
|
|
public static string EnumsNamespace = "Enums";
|
|
|
|
|
2007-08-01 11:27:57 +02:00
|
|
|
public static string DelegatesClass = "Delegates";
|
|
|
|
public static string ImportsClass = "Imports";
|
2007-08-20 14:25:48 +02:00
|
|
|
|
2007-08-01 11:27:57 +02:00
|
|
|
public static Legacy Compatibility = Legacy.None;
|
2007-07-23 02:15:18 +02:00
|
|
|
|
2007-08-03 02:14:31 +02:00
|
|
|
/// <summary>
|
|
|
|
/// The name of the C# enum which holds every single OpenGL enum (for compatibility purposes).
|
|
|
|
/// </summary>
|
|
|
|
public static string CompleteEnumName = "All";
|
2007-08-12 18:14:23 +02:00
|
|
|
|
2007-10-21 17:48:52 +02:00
|
|
|
[Flags]
|
2007-08-01 11:27:57 +02:00
|
|
|
public enum Legacy
|
|
|
|
{
|
2007-10-21 17:48:52 +02:00
|
|
|
None = 0x00,
|
|
|
|
ConstIntEnums = 0x01,
|
|
|
|
NoAdvancedEnumProcessing = 0x02,
|
|
|
|
NoPublicUnsafeFunctions = 0x04,
|
|
|
|
NoTrimFunctionEnding = NoPublicUnsafeFunctions,
|
|
|
|
NoTrimFunctionPrefix = 0x08,
|
|
|
|
NoSeparateFunctionNamespaces = 0x10,
|
|
|
|
TurnVoidPointersToIntPtr = 0x20,
|
2007-10-26 14:56:03 +02:00
|
|
|
GenerateAllPermutations = 0x40,
|
2007-11-04 16:17:37 +01:00
|
|
|
NestedEnums = 0x80,
|
2007-10-26 14:56:03 +02:00
|
|
|
Tao = ConstIntEnums | NoAdvancedEnumProcessing | NoPublicUnsafeFunctions | NoTrimFunctionEnding | NoTrimFunctionPrefix | NoSeparateFunctionNamespaces | TurnVoidPointersToIntPtr | GenerateAllPermutations,
|
2007-08-01 11:27:57 +02:00
|
|
|
}
|
2007-08-12 18:14:23 +02:00
|
|
|
|
2007-08-20 14:25:48 +02:00
|
|
|
public static string WindowsGDI = "OpenTK.Platform.Windows.API";
|
2007-07-23 02:15:18 +02:00
|
|
|
}
|
|
|
|
}
|