Skip to content

cvcGL: mirror-viewport fidelity + router/camera fixes from the PiP gap analysis - #389

Merged
transfix merged 1 commit into
masterfrom
feat/cvcgl-mirror-fixes
Sep 21, 2026
Merged

transfix merged 1 commit into
masterfrom
feat/cvcgl-mirror-fixes

Conversation

@transfix

Copy link
Copy Markdown
Owner

cvcGL: mirror-viewport fidelity + router/camera fixes from the PiP gap analysis

Concrete defects a gap-analysis pass found in the merged PiP stack (#384/#386/
#387), fixed before the minimap demo exercises them:

  • Mirror double-drew 2-D overlays: syncMirrorProps copied EVERY prop, so a
    mirror of a scene with FpsHud/ScreenTextHud drew the HUD a second time on the
    inset. It now skips vtkActor2D (a window-space overlay, not scene geometry) —
    matching the shipping wasm PiP.
  • Mirror rendered flat: syncMirrorProps copied view props but not lights, so a
    mirror of a StageLighting-rigged scene lost its lighting. It now copies the
    source's lights (world-space, correct from the mirror's own camera); with
    none, the mirror falls back to VTK's automatic headlight.
  • MB::Right was not the no-op the header claims: its button-down latched a drag
    target and called setActiveViewport, so a right-click silently stole keyboard
    focus and released the prior viewport's held keys. routeMouseButton now
    returns immediately for Right.
  • CameraController::viewportAspect preferred the WINDOW size over the renderer's
    for the Map/ortho fit, so a PiP inset in Map mode framed to the wrong aspect;
    it now prefers the viewport (renderer) size, matching the pan scaling, and
    falls back to the window before the first frame.
  • Fixed the stale "addMirrorViewport, a follow-up" comment (it shipped in cvcGL: mirror viewports — alternate cameras over a shared scene (minimap) #386).

Tests: cvcgl_viewport gains a check that a 2-D actor on the source does NOT reach
the mirror while a source light DOES; cvcgl_viewport_input gains a Right-button
no-op check (no focus steal, no camera motion). Full cvcgl suite (29) green
locally.

…p analysis

Concrete defects a gap-analysis pass found in the merged PiP stack (#384/#386/
#387), fixed before the minimap demo exercises them:

  * Mirror double-drew 2-D overlays: syncMirrorProps copied EVERY prop, so a
    mirror of a scene with FpsHud/ScreenTextHud drew the HUD a second time on the
    inset. It now skips vtkActor2D (a window-space overlay, not scene geometry) —
    matching the shipping wasm PiP.
  * Mirror rendered flat: syncMirrorProps copied view props but not lights, so a
    mirror of a StageLighting-rigged scene lost its lighting. It now copies the
    source's lights (world-space, correct from the mirror's own camera); with
    none, the mirror falls back to VTK's automatic headlight.
  * MB::Right was not the no-op the header claims: its button-down latched a drag
    target and called setActiveViewport, so a right-click silently stole keyboard
    focus and released the prior viewport's held keys. routeMouseButton now
    returns immediately for Right.
  * CameraController::viewportAspect preferred the WINDOW size over the renderer's
    for the Map/ortho fit, so a PiP inset in Map mode framed to the wrong aspect;
    it now prefers the viewport (renderer) size, matching the pan scaling, and
    falls back to the window before the first frame.
  * Fixed the stale "addMirrorViewport, a follow-up" comment (it shipped in #386).

Tests: cvcgl_viewport gains a check that a 2-D actor on the source does NOT reach
the mirror while a source light DOES; cvcgl_viewport_input gains a Right-button
no-op check (no focus steal, no camera motion). Full cvcgl suite (29) green
locally.
@transfix
transfix merged commit 7a2f2d2 into master Sep 21, 2026
13 checks passed
@transfix
transfix deleted the feat/cvcgl-mirror-fixes branch September 21, 2026 20:25
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