Skip to content

Near-fullscreen overlay + cursor + sub-rect raycast for 2D-surround (#131)#139

Merged
dfattal merged 1 commit into
mainfrom
feat/overlay-fullscreen-131
Jun 2, 2026
Merged

Near-fullscreen overlay + cursor + sub-rect raycast for 2D-surround (#131)#139
dfattal merged 1 commit into
mainfrom
feat/overlay-fullscreen-131

Conversation

@dfattal
Copy link
Copy Markdown
Collaborator

@dfattal dfattal commented Jun 2, 2026

Fullscreen 2D-surround region-editor support for the transparent overlay (#131), with a clean, deterministic startup.

Overlay geometry (native, Win32)

  • displayxr_set_fullscreen_overlay_pref (new, opt-in): when set before session create, the transparent overlay is born covering nearly the whole monitor — the monitor rect minus 1px on right+bottom — instead of Unity's small windowed client rect.
    • The 1px keeps the window DWM-composited. An exact-monitor window trips Windows fullscreen-optimization / independent-flip (DWM-alpha bypass), which was the source of the startup white flashes + hang. Confirmed against a clean-era log where a near-full 3517×2160 overlay was perfectly smooth — coverage was never the problem, exact-monitor was.
    • Still covers the taskbar (tiger feet render over it). Born at final size → never resized (a resize recreates the presentation swapchain = a flash). The transparent-enable snap and set_overlay_fullscreen are no-ops when already near-fullscreen.
  • displayxr_set_overlay_cursor (new): app-driven overlay cursor shape (arrow / resize / move) via WM_SETCURSOR for the region editor.

Sub-rect-aware interaction (C#)

  • displayxr_get_canvas_rect_px binding + GetStereoViewport so the cyclopean raycast in DisplayXRTransparentOverlay maps the cursor through the canvas sub-rect (matching the sub-rect Kooima projection from Sub-rect-aware Kooima: physically-correct 3D inside the surround canvas (#131) #135) — fixes LMB-rotate when a canvas sub-rect is active. Zero change with no sub-rect.
  • DisplayXRTransparentOverlay.RequestFullscreenOverlay wrapper.

Diagnostics

  • Coarse [+ms] relative timestamps on every native log line.

Windows-only native (win32.c); macOS resolves via C# EntryPointNotFound fallback. Hardware-validated on RTX 3080 + Leia SR: clean, deterministic startup across launches.

…131)

Fullscreen 2D-surround region-editor support, plus a clean, deterministic
startup for the transparent overlay.

Overlay geometry (native, Win32):
- New opt-in displayxr_set_fullscreen_overlay_pref: when set before session
  create, the transparent overlay is born covering nearly the whole monitor
  (monitor rect MINUS 1px on right+bottom) instead of Unity's small windowed
  client rect. The 1px keeps the window DWM-composited; an EXACT-monitor window
  trips Windows fullscreen-optimization / independent-flip (DWM-alpha bypass),
  which was the source of the startup white flashes + hang. It still covers the
  taskbar so content (e.g. the tiger's feet) renders over it. Born at final
  size so it is never resized (a resize recreates the presentation swapchain =
  a flash); the transparent-enable snap and set_overlay_fullscreen are no-ops
  when already near-fullscreen.
- New displayxr_set_overlay_cursor: app-driven overlay cursor shape via
  WM_SETCURSOR (arrow / resize / move) for the region editor.

Sub-rect-aware interaction (C#):
- displayxr_get_canvas_rect_px binding + GetStereoViewport so the cyclopean
  raycast in DisplayXRTransparentOverlay maps the cursor through the canvas
  sub-rect (matching the sub-rect Kooima projection from #135), fixing
  LMB-rotate when a canvas sub-rect is active. Zero change with no sub-rect.
- DisplayXRTransparentOverlay.RequestFullscreenOverlay wrapper for the pref.

Diagnostics:
- Coarse [+ms] relative timestamps on every native log line.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dfattal dfattal merged commit d3b4cee into main Jun 2, 2026
4 checks passed
@dfattal dfattal deleted the feat/overlay-fullscreen-131 branch June 2, 2026 03:38
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