fix: restore paper-space viewport rendering as single full-canvas widget
Iced 0.14 batches all shader prepare() calls before any render() calls. Multiple ViewportPane widgets sharing the same Pipeline type overwrite each other's GPU buffers, causing the PaperSheet layer (full-canvas) to render the last viewport's model content — appearing full-screen. Fix: paper_canvas_view() now renders a single full-canvas PaperSheet widget. build_paper_sheet_primitive() is updated to include model-space content projected through each viewport's view matrix (via viewport_content_wires()), restoring the original working behaviour. ViewportPane::Paper mode and viewport_screen_rect() are kept with #[allow(dead_code)] — a per-viewport wgpu sub-renderer that accumulates data across frames could revive them in the future. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
592e3da6ac
commit
d1d4bb3d02
4 changed files with 33 additions and 62 deletions
|
|
@ -2103,9 +2103,9 @@ impl Scene {
|
|||
/// `Rectangle` relative to the top-left of the paper canvas.
|
||||
///
|
||||
/// `canvas_px` — the pixel dimensions of the area that shows the paper.
|
||||
/// Paper limits from the current layout define the paper-space extent;
|
||||
/// the viewport is mapped linearly into that area (Y-axis flipped).
|
||||
/// Returns `None` if the viewport handle is invalid or paper limits are missing.
|
||||
/// Map a paper-space viewport into screen-pixel coordinates.
|
||||
/// Needed when per-viewport shader widgets are revived (see `ViewportPaneMode::Paper`).
|
||||
#[allow(dead_code)]
|
||||
pub fn viewport_screen_rect(
|
||||
&self,
|
||||
vp_handle: Handle,
|
||||
|
|
|
|||
Loading…
Reference in a new issue