Skip to content

refactor: centralize presentation render plans - #283

Open
nmfisher wants to merge 3 commits into
developfrom
codex/render-pipeline-refactor
Open

refactor: centralize presentation render plans#283
nmfisher wants to merge 3 commits into
developfrom
codex/render-pipeline-refactor

Conversation

@nmfisher

@nmfisher nmfisher commented Aug 24, 2026

Copy link
Copy Markdown
Owner

This PR centralizes swapchain attachment/renderability state in RenderManager, and separates a platform presentation target from a view's raw Filament render target.

View.setRenderTarget now always means “bind this target directly to the Filament view”. The new View.setPresentationRenderTarget is the platform-facing entry point for changing the final output target. Its default implementation delegates to setRenderTarget, while composite pipelines can override it to route intermediate targets without changing the low-level API's meaning.

RenderManager now exposes:

  • setRenderables, for applying a group of view renderability changes before synchronizing the updated attachment lists
  • getViewAttachments, which returns one immutable, ordered List<ViewAttachment> containing the view, render order, and current renderability state

FilamentApp.capture takes one attachment list before beginning the frame and uses it throughout both the primary render/readback loop and the WebGL completion frame. It renders only renderable attachments, while still reading every attached target for per-view diagnostics. This avoids mixing attachment state across async render-thread calls. The capture callback is also awaited, and the WebAssembly success path now resumes the render manager before returning.

NativeTextureSurfaceManager now deals exclusively in presentation targets. This removes its highlight-overlay-specific target routing and leaves ownership of composite routing with the view/pipeline that implements it.

Adds coverage for attachment ordering, retained renderability, grouped updates, and immutability of the returned attachment list.

The RenderManager interface now documents the full attachment lifecycle, ordering and ownership rules, the distinction between attachment and render-target routing, native/web completion semantics, and the teardown requirements for views and swapchains.

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