improve gl api doc

This commit is contained in:
Youmu Liu
2026-08-27 18:24:55 +08:00
parent 648cac9d9b
commit 3cba929599
12 changed files with 3611 additions and 1790 deletions
@@ -331,7 +331,9 @@ namespace StgSharp.GenerateGL.Generation
builder.Append("{\n");
builder.Append(" public unsafe partial struct OpenglContext\n");
builder.Append(" {\n");
foreach (GlCommandDefinition command in commands)
foreach (GlCommandDefinition command in commands.OrderBy(
value => value.Name,
StringComparer.Ordinal))
{
builder.Append(" internal delegate* unmanaged<");
foreach (GlParameterDefinition parameter in command.Parameters)
@@ -415,12 +417,15 @@ namespace StgSharp.GenerateGL.Generation
{
string declaration = ReadNativeDeclaration(method.NativeCommand);
string page = method.DocumentationPage ?? method.NativeCommand.Name;
builder.Append("\n /// <summary>Forwards to the native C API <c>");
builder.Append("\n /// <summary>\n");
builder.Append(" /// <para>Forwards to the native OpenGL entry point.</para>\n");
builder.Append(" /// <para><c>");
builder.Append(EscapeXml(declaration));
builder.Append("</c>.</summary>\n");
builder.Append(" /// <seealso href=\"https://docs.gl/gl4/");
builder.Append("</c></para>\n");
builder.Append(" /// <para>See <see href=\"https://docs.gl/gl4/");
builder.Append(page);
builder.Append("\" />");
builder.Append("\">docs.gl</see>.</para>\n");
builder.Append(" /// </summary>");
}
private static string ReadNativeDeclaration(