mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-10 09:07:32 +00:00
Moved output filenames to Settings class.
This commit is contained in:
parent
33bdb90b70
commit
c3bfa7dc9a
|
@ -16,7 +16,7 @@ namespace Bind.CL
|
||||||
{
|
{
|
||||||
glTypemap = null;
|
glTypemap = null;
|
||||||
|
|
||||||
wrappersFile = "CL.cs";
|
Settings.WrappersFile = "CL.cs";
|
||||||
|
|
||||||
Settings.FunctionPrefix = "cl";
|
Settings.FunctionPrefix = "cl";
|
||||||
Settings.ConstantPrefix = "CL_";
|
Settings.ConstantPrefix = "CL_";
|
||||||
|
|
|
@ -41,20 +41,8 @@ namespace Bind
|
||||||
|
|
||||||
sealed class CSharpSpecWriter : ISpecWriter
|
sealed class CSharpSpecWriter : ISpecWriter
|
||||||
{
|
{
|
||||||
readonly string wrappersFile;
|
|
||||||
readonly string enumsFile;
|
|
||||||
readonly string delegatesFile;
|
|
||||||
readonly string importsFile;
|
|
||||||
readonly char[] numbers = "0123456789".ToCharArray();
|
readonly char[] numbers = "0123456789".ToCharArray();
|
||||||
|
|
||||||
public CSharpSpecWriter(string wrappersFile, string importsFile, string enumsFile, string delegatesFile)
|
|
||||||
{
|
|
||||||
this.wrappersFile = wrappersFile;
|
|
||||||
this.importsFile = importsFile;
|
|
||||||
this.enumsFile = enumsFile;
|
|
||||||
this.delegatesFile = delegatesFile;
|
|
||||||
}
|
|
||||||
|
|
||||||
#region WriteBindings
|
#region WriteBindings
|
||||||
|
|
||||||
public void WriteBindings(DelegateCollection delegates, FunctionCollection wrappers, EnumCollection enums)
|
public void WriteBindings(DelegateCollection delegates, FunctionCollection wrappers, EnumCollection enums)
|
||||||
|
@ -156,10 +144,10 @@ namespace Bind
|
||||||
sw.WriteLine("}");
|
sw.WriteLine("}");
|
||||||
}
|
}
|
||||||
|
|
||||||
string output_enums = Path.Combine(Settings.OutputPath, enumsFile);
|
string output_enums = Path.Combine(Settings.OutputPath, Settings.EnumsFile);
|
||||||
string output_delegates = Path.Combine(Settings.OutputPath, delegatesFile);
|
string output_delegates = Path.Combine(Settings.OutputPath, Settings.DelegatesFile);
|
||||||
string output_core = Path.Combine(Settings.OutputPath, importsFile);
|
string output_core = Path.Combine(Settings.OutputPath, Settings.ImportsFile);
|
||||||
string output_wrappers = Path.Combine(Settings.OutputPath, wrappersFile);
|
string output_wrappers = Path.Combine(Settings.OutputPath, Settings.WrappersFile);
|
||||||
|
|
||||||
if (File.Exists(output_enums)) File.Delete(output_enums);
|
if (File.Exists(output_enums)) File.Delete(output_enums);
|
||||||
if (File.Exists(output_delegates)) File.Delete(output_delegates);
|
if (File.Exists(output_delegates)) File.Delete(output_delegates);
|
||||||
|
|
|
@ -27,10 +27,10 @@ namespace Bind.ES
|
||||||
glSpecExt = String.Empty;
|
glSpecExt = String.Empty;
|
||||||
functionOverridesFile = dirName + "/overrides.xml";
|
functionOverridesFile = dirName + "/overrides.xml";
|
||||||
|
|
||||||
importsFile = "Core.cs";
|
Settings.ImportsFile = "Core.cs";
|
||||||
delegatesFile = "Delegates.cs";
|
Settings.DelegatesFile = "Delegates.cs";
|
||||||
enumsFile = "Enums.cs";
|
Settings.EnumsFile = "Enums.cs";
|
||||||
wrappersFile = "ES.cs";
|
Settings.WrappersFile = "ES.cs";
|
||||||
Settings.ImportsClass = "Core";
|
Settings.ImportsClass = "Core";
|
||||||
Settings.DelegatesClass = "Delegates";
|
Settings.DelegatesClass = "Delegates";
|
||||||
|
|
||||||
|
|
|
@ -46,10 +46,10 @@ namespace Bind.GL2
|
||||||
glSpecExt = String.Empty;
|
glSpecExt = String.Empty;
|
||||||
functionOverridesFile = "GL2/gloverrides.xml";
|
functionOverridesFile = "GL2/gloverrides.xml";
|
||||||
|
|
||||||
importsFile = "GLCore.cs";
|
Settings.ImportsFile = "GLCore.cs";
|
||||||
delegatesFile = "GLDelegates.cs";
|
Settings.DelegatesFile = "GLDelegates.cs";
|
||||||
enumsFile = "GLEnums.cs";
|
Settings.EnumsFile = "GLEnums.cs";
|
||||||
wrappersFile = "GL.cs";
|
Settings.WrappersFile = "GL.cs";
|
||||||
Settings.ImportsClass = "Core";
|
Settings.ImportsClass = "Core";
|
||||||
Settings.DelegatesClass = "Delegates";
|
Settings.DelegatesClass = "Delegates";
|
||||||
|
|
||||||
|
|
|
@ -29,11 +29,6 @@ namespace Bind.GL2
|
||||||
protected static string glSpec = "GL2/gl.spec";
|
protected static string glSpec = "GL2/gl.spec";
|
||||||
protected static string glSpecExt = "";
|
protected static string glSpecExt = "";
|
||||||
|
|
||||||
protected static string importsFile = "GLCore.cs";
|
|
||||||
protected static string delegatesFile = "GLDelegates.cs";
|
|
||||||
protected static string enumsFile = "GLEnums.cs";
|
|
||||||
protected static string wrappersFile = "GL.cs";
|
|
||||||
|
|
||||||
protected static string functionOverridesFile = "GL2/gloverrides.xml";
|
protected static string functionOverridesFile = "GL2/gloverrides.xml";
|
||||||
|
|
||||||
protected static string loadAllFuncName = "LoadAll";
|
protected static string loadAllFuncName = "LoadAll";
|
||||||
|
@ -44,8 +39,7 @@ namespace Bind.GL2
|
||||||
//protected static readonly Dictionary<string, string> doc_replacements;
|
//protected static readonly Dictionary<string, string> doc_replacements;
|
||||||
|
|
||||||
protected ISpecReader SpecReader = new XmlSpecReader(functionOverridesFile);
|
protected ISpecReader SpecReader = new XmlSpecReader(functionOverridesFile);
|
||||||
protected ISpecWriter SpecWriter = new CSharpSpecWriter(wrappersFile, importsFile,
|
protected ISpecWriter SpecWriter = new CSharpSpecWriter();
|
||||||
enumsFile, delegatesFile);
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -62,6 +56,11 @@ namespace Bind.GL2
|
||||||
{
|
{
|
||||||
// Defaults
|
// Defaults
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Settings.ImportsFile = "GLCore.cs";
|
||||||
|
Settings.DelegatesFile = "GLDelegates.cs";
|
||||||
|
Settings.EnumsFile = "GLEnums.cs";
|
||||||
|
Settings.WrappersFile = "GL.cs";
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -33,6 +33,11 @@ namespace Bind
|
||||||
public static string ConstantPrefix = "GL_";
|
public static string ConstantPrefix = "GL_";
|
||||||
public static string EnumPrefix = "";
|
public static string EnumPrefix = "";
|
||||||
|
|
||||||
|
public static string ImportsFile = "Core.cs";
|
||||||
|
public static string DelegatesFile = "Delegates.cs";
|
||||||
|
public static string EnumsFile = "Enums.cs";
|
||||||
|
public static string WrappersFile = "GL.cs";
|
||||||
|
|
||||||
// TODO: This code is too fragile.
|
// TODO: This code is too fragile.
|
||||||
// Old enums code:
|
// Old enums code:
|
||||||
public static string normalEnumsClassOverride = null;
|
public static string normalEnumsClassOverride = null;
|
||||||
|
|
Loading…
Reference in a new issue