Skip to content

rendering: add retained render layers and replay lifecycle - #55

Open
tritao wants to merge 24 commits into
stack/drawlist-manager-rebuiltfrom
stack/drawlist-layers-rebuilt
Open

rendering: add retained render layers and replay lifecycle#55
tritao wants to merge 24 commits into
stack/drawlist-manager-rebuiltfrom
stack/drawlist-layers-rebuilt

Conversation

@tritao

@tritao tritao commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Builds on #54 and completes the retained renderer's semantic and lifecycle
foundation before the performance work begins.

Purpose

Real scenes are not rendered as one uninterrupted list. They contain overlays,
ordered layers, local viewport or camera changes, and explicit depth clears.
Some nodes also delay work until traversal state would normally have gone out
of scope. The retained renderer therefore needs a single authoritative model
for ordering that work and for deciding which state survives until replay.

This PR introduces retained render layers and makes the render plan the source
of truth for visual drawing, selection, and picking. It also defines how
backend resources are released during normal shutdown and discarded after
context loss.

What changed

  • Add SoRenderLayerGroup for stage-aware layer traversal and scoped depth
    clears.
  • Capture the replay context needed by delayed traversal instead of relying on
    expired action state.
  • Execute layer operations and selection at render-plan depth boundaries.
  • Make picking follow the same visual depth segments as rendering.
  • Distinguish normal backend shutdown from context-loss resource discard.
  • Expose renderer capability, pipeline outcome, and matrix-policy contracts
    needed by manager and application integrations.

Ownership and scope

The planner owns execution order. The backend owns OpenGL resources. The
manager orchestrates the pipeline, while selection policy remains outside it.

This layer defines renderer semantics and lifecycle only. Benchmark tooling
and performance optimizations start in #67.

Validation

  • Render-layer ordering, viewport overrides, and scoped depth clears.
  • Delayed replay with preserved traversal context.
  • Selection and picking across visual depth segments.
  • Backend shutdown, context-loss discard, and resource recovery.
  • Core-only and compatibility configurations, including Windows shared-library
    boundaries for non-exported implementation fixtures.

@tritao tritao changed the title stack/drawlist layers rebuilt rendering: add retained render layers and replay lifecycle Aug 15, 2026
@tritao
tritao force-pushed the stack/drawlist-layers-rebuilt branch 2 times, most recently from a2e2165 to 60751d2 Compare August 15, 2026 12:55
@tritao
tritao force-pushed the stack/drawlist-layers-rebuilt branch from 60751d2 to bc2d160 Compare August 15, 2026 13:07
@tritao
tritao force-pushed the stack/drawlist-layers-rebuilt branch from bc2d160 to dcb7aa1 Compare August 15, 2026 15:51
@tritao
tritao force-pushed the stack/drawlist-layers-rebuilt branch from dcb7aa1 to 5ef85f6 Compare August 15, 2026 17:03
@tritao
tritao force-pushed the stack/drawlist-layers-rebuilt branch 2 times, most recently from 149b8a3 to 85a1505 Compare August 15, 2026 17:30
@tritao
tritao force-pushed the stack/drawlist-layers-rebuilt branch 2 times, most recently from 3efedcd to 7c245c8 Compare August 15, 2026 23:53
@tritao
tritao force-pushed the stack/drawlist-layers-rebuilt branch from 7c245c8 to 1e15bea Compare August 16, 2026 00:00
@tritao
tritao force-pushed the stack/drawlist-layers-rebuilt branch from 1e15bea to b2fc3f2 Compare August 16, 2026 00:03
@tritao
tritao force-pushed the stack/drawlist-layers-rebuilt branch from b2fc3f2 to bcbe7af Compare August 16, 2026 00:25
@tritao
tritao force-pushed the stack/drawlist-layers-rebuilt branch from bcbe7af to 91c0fd2 Compare August 16, 2026 09:49
@tritao
tritao force-pushed the stack/drawlist-layers-rebuilt branch from 91c0fd2 to 05d5f80 Compare August 16, 2026 10:00
@tritao
tritao force-pushed the stack/drawlist-layers-rebuilt branch 2 times, most recently from 26b7f51 to 366c218 Compare August 16, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant