Near-fullscreen overlay + cursor + sub-rect raycast for 2D-surround (#131)#139
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.set_overlay_fullscreenare no-ops when already near-fullscreen.displayxr_set_overlay_cursor(new): app-driven overlay cursor shape (arrow / resize / move) viaWM_SETCURSORfor the region editor.Sub-rect-aware interaction (C#)
displayxr_get_canvas_rect_pxbinding +GetStereoViewportso the cyclopean raycast inDisplayXRTransparentOverlaymaps 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.RequestFullscreenOverlaywrapper.Diagnostics
[+ms]relative timestamps on every native log line.Windows-only native (win32.c); macOS resolves via C#
EntryPointNotFoundfallback. Hardware-validated on RTX 3080 + Leia SR: clean, deterministic startup across launches.