Refactor flat screen display to use overlay system#9
Open
Conversation
Move all overlay quad generation logic into OverlayComponent so both OpenXR and OpenVR runtimes use a single code path for flat screen display. - Add generate_slate_quad() to OverlayComponent::OpenXR for flat screen game display, replacing the inline quad code in OpenXR::end_frame() - Add update_slate_openvr() for OpenVR flat screen overlay support using the existing m_slate_overlay_handle - Wire D3D11/D3D12 components to pass slate quad layers from OverlayComponent - Remove OpenVR early-return from showFlatScreenDisplay() to enable support - Remove m_flat_screen_distance from VRRuntime and VR module (now owned by OverlayComponent's m_slate_distance with full UI controls) - Restore slate overlay UI controls (distance, size, XY offset, follows view) and re-enable wrist UI option for OpenVR https://claude.ai/code/session_01Ae7bwDrEvmhydD5MPCRKin
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.
Summary
Refactored the flat screen display feature to leverage the existing overlay system instead of using a separate quad layer configuration. This consolidates UI rendering logic and provides better integration with the overlay component's positioning and interaction handling.
Key Changes
Removed flat screen distance slider from VR settings UI and configuration system
m_flat_screen_distancemember variable and its associated ModSliderModSettings::showFlatScreenDisplay()logic that was specific to OpenVRIntegrated flat screen display with overlay component
update_slate_openvr()to handle OpenVR flat screen renderinggenerate_slate_quad()for OpenXR flat screen renderingModSettings::showFlatScreenDisplay()to conditionally show/hide the overlayReorganized overlay UI settings
Updated D3D11 and D3D12 components
on_frame()methods when flat screen display is enabledSimplified OpenXR flat screen handling
OpenXR::end_frame()OverlayComponent::generate_slate_quad()for consistent behaviorImplementation Details
The flat screen display now uses the same overlay positioning system as other UI elements, allowing users to control distance, size, and offset through the unified overlay settings. Controller intersection detection is properly implemented for both OpenVR and OpenXR backends.
https://claude.ai/code/session_01Ae7bwDrEvmhydD5MPCRKin