refactor(app): compose world rendering startup
Move Region/environment, mandatory modern rendering, terrain, WB, texture, and sampler construction behind the typed Phase-4 composition boundary. Give every fallible GL constructor prefix retryable ownership so partial startup failure cannot leak or replay resource deletion while preserving the accepted render path and DAT inputs. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
cd7b519f78
commit
6a2fe98cc4
22 changed files with 1983 additions and 634 deletions
|
|
@ -1,10 +1,15 @@
|
|||
namespace AcDream.App.Rendering;
|
||||
|
||||
internal interface IGameRenderResourceLifetime
|
||||
{
|
||||
TerrainAtlas AcquireTerrainAtlas(Func<TerrainAtlas> factory);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sole lifetime owner for render resources that are borrowed by, but not
|
||||
/// owned by, their renderers.
|
||||
/// </summary>
|
||||
internal sealed class GameRenderResourceLifetime
|
||||
internal sealed class GameRenderResourceLifetime : IGameRenderResourceLifetime
|
||||
{
|
||||
private readonly OwnedResourceSlot<TerrainAtlas> _terrainAtlas = new();
|
||||
private readonly OwnedResourceSlot<Shader> _skyShader = new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue