mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-03 01:51:13 +00:00
* CppSpecWriter.cs: Renamed output files to gldef++.
Added preprocessor macros for enum generation.
This commit is contained in:
parent
b4a6448261
commit
d6484bd630
|
@ -74,7 +74,6 @@ namespace Bind
|
||||||
{
|
{
|
||||||
WriteLicense(sw);
|
WriteLicense(sw);
|
||||||
|
|
||||||
sw.WriteLine("#include \"gldef++.h\"");
|
|
||||||
sw.WriteLine("namespace {0}", Settings.OutputNamespace);
|
sw.WriteLine("namespace {0}", Settings.OutputNamespace);
|
||||||
sw.WriteLine("{");
|
sw.WriteLine("{");
|
||||||
sw.Indent();
|
sw.Indent();
|
||||||
|
@ -96,7 +95,6 @@ namespace Bind
|
||||||
{
|
{
|
||||||
WriteLicense(sw);
|
WriteLicense(sw);
|
||||||
|
|
||||||
sw.WriteLine("#include \"gldef++.cpp\"");
|
|
||||||
sw.WriteLine("namespace {0}", Settings.OutputNamespace);
|
sw.WriteLine("namespace {0}", Settings.OutputNamespace);
|
||||||
sw.WriteLine("{");
|
sw.WriteLine("{");
|
||||||
sw.Indent();
|
sw.Indent();
|
||||||
|
@ -107,8 +105,8 @@ namespace Bind
|
||||||
sw.WriteLine("}");
|
sw.WriteLine("}");
|
||||||
}
|
}
|
||||||
|
|
||||||
string output_header = Path.Combine(Settings.OutputPath, "gl++.h");
|
string output_header = Path.Combine(Settings.OutputPath, "gldef++.h");
|
||||||
string output_cpp = Path.Combine(Settings.OutputPath, "gl++.cpp");
|
string output_cpp = Path.Combine(Settings.OutputPath, "gldef++.cpp");
|
||||||
if (File.Exists(output_header))
|
if (File.Exists(output_header))
|
||||||
File.Delete(output_header);
|
File.Delete(output_header);
|
||||||
File.Move(temp_header_file, output_header);
|
File.Move(temp_header_file, output_header);
|
||||||
|
@ -431,10 +429,7 @@ namespace Bind
|
||||||
{
|
{
|
||||||
foreach (Enum @enum in enums.Values)
|
foreach (Enum @enum in enums.Values)
|
||||||
{
|
{
|
||||||
sw.WriteLine("struct {0} : Enumeration<{0}>", @enum.Name);
|
sw.WriteLine("ENUM({0})", @enum.Name);
|
||||||
sw.WriteLine("{");
|
|
||||||
sw.Indent();
|
|
||||||
sw.WriteLine("enum");
|
|
||||||
sw.WriteLine("{");
|
sw.WriteLine("{");
|
||||||
sw.Indent();
|
sw.Indent();
|
||||||
foreach (var c in @enum.ConstantCollection.Values)
|
foreach (var c in @enum.ConstantCollection.Values)
|
||||||
|
@ -447,8 +442,7 @@ namespace Bind
|
||||||
}
|
}
|
||||||
sw.Unindent();
|
sw.Unindent();
|
||||||
sw.WriteLine("};");
|
sw.WriteLine("};");
|
||||||
sw.Unindent();
|
sw.WriteLine("END_ENUM({0})", @enum.Name);
|
||||||
sw.WriteLine("};");
|
|
||||||
sw.WriteLine();
|
sw.WriteLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue