refactor(lifetime): own render resource prefixes

Give terrain, sky, retained UI, portal preparation, and the update/render frame pair explicit single owners. Make shader, texture, text, bindless, and GL construction prefixes checked and retryable so partial failure cannot lose or replay resource ownership.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-22 14:42:14 +02:00
parent fec0d94148
commit c87b15303d
41 changed files with 3768 additions and 355 deletions

View file

@ -56,6 +56,8 @@ public sealed class UiHost : System.IDisposable
private bool _disposeRequested;
private bool _disposed;
internal bool IsDisposalComplete => _disposed;
public UiHost(GL gl, string shaderDir, BitmapFont? defaultFont = null)
: this(gl, shaderDir, defaultFont, new HostQuiescenceGate())
{
@ -67,9 +69,9 @@ public sealed class UiHost : System.IDisposable
BitmapFont? defaultFont,
HostQuiescenceGate quiescence)
{
_quiescence = quiescence ?? throw new ArgumentNullException(nameof(quiescence));
TextRenderer = new TextRenderer(gl, shaderDir);
DefaultFont = defaultFont;
_quiescence = quiescence ?? throw new ArgumentNullException(nameof(quiescence));
}
// ── Per-frame ──────────────────────────────────────────────────────