refactor(render): compose render frame orchestrator

Move the accepted draw transaction and failure recovery behind typed frame-phase owners so GameWindow only supplies immutable frame input. Preserve retail draw order, make ImGui/bootstrap shutdown ownership explicit, and restore exact text-render GL state on failures.\n\nCo-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-22 08:03:49 +02:00
parent 28e1cf8029
commit 9d7df1bfc5
25 changed files with 1675 additions and 279 deletions

View file

@ -60,5 +60,15 @@ public sealed class ImGuiBootstrapper : IDisposable
/// </summary>
public void Render() => _controller.Render();
/// <summary>
/// Close an unfinished frame through the owning Silk controller. Silk's
/// controller clears its private frame-begun flag before uploading draw
/// data, so this is both the correct abort path for pre-render failures and
/// an idempotent no-op when a render upload failed after logical close.
/// Calling raw <c>ImGui.EndFrame</c> here would leave the controller's state
/// open and poison its next <see cref="BeginFrame"/> call.
/// </summary>
public void AbortFrame() => _controller.Render();
public void Dispose() => _controller.Dispose();
}