Implement resizable windows with main-thread cached presentation - #198
Open
genixpro wants to merge 7 commits into
Open
Implement resizable windows with main-thread cached presentation#198genixpro wants to merge 7 commits into
genixpro wants to merge 7 commits into
Conversation
Adapt the right-edge anchoring, minimap positioning, and editor frame extraction from Nathan Mills's PR #64 to the current source layout. Keep drawing and hit testing on one shared widget rectangle and refresh minimap coordinates before input as well as painting. Document a follow-up design using main-thread cached-frame presentation for modal resize callbacks. This change does not enable live resizing. Co-authored-by: Nathan Mills <38995150+Quipyowert2@users.noreply.github.com>
genixpro
marked this pull request as draft
September 8, 2026 01:35
genixpro
marked this pull request as ready for review
September 8, 2026 03:15
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.
Windowed Glob2 can now resize while retaining its OpenGL context and sprite textures. Editor controls and minimap hitboxes follow the logical width, normal screens reflow, and overlay dialogs stay within the parent bounds. During Windows modal resizing, an exposed-event callback presents the last completed frame; normal polling applies the final OS dimensions and resumes drawing.
Credit to Nathan Mills (@Quipyowert2) for the editor anchoring, minimap positioning, and frame extraction in #64. The foundation commit includes his co-author attribution. This implementation adapts that groundwork to current master and keeps the event loop, rendering, and simulation on one thread.
Implementation
SDL_SetWindowSizeor recreating the GL context.resize-testintegration coverage and run both backends in Linux CI.docs/window-resizing.mddescribes ownership, timing, behavior, and remaining acceptance checks.Validation
71da3dbbc(Ubuntu 22.04, Ubuntu 24.04, Windows MinGW). The final acceptance-results commit only changes documentation.WindowResizeHarness softwareandglpassed: cached pixels survive incomplete drawing, callback guards, no normal-frame advancement from exposes, GL state restoration, grow/shrink reflow, context identity, input coordinates, minimum size, and cache invalidation/rendering after window recreation.FullscreenAspectHarness softwareandglpassed at five dimensions: aspect preservation, clipping, screen capture, and mouse mapping.--nox games/gd-small-2ai.game 10 1completed with checksumcda93c80.git diff --checkpassed.Final Windows acceptance pass
docs/window-resizing.md.Behavior and coverage limits
Ready for review. Windows modal sizing pauses simulation and displays the cached frame until the drag ends; the tested LAN match recovered without desynchronization. This does not promise uninterrupted multiplayer simulation during a drag. Existing pacing bounds catch-up to 500 ms.
The VM tests use CPU-rendered OpenGL and loopback networking. Physical Windows GPU drivers, mixed-DPI multi-monitor transitions, Internet latency/packet loss, and public YOG-server behavior remain unverified coverage, not known failures. The tutorial pass covers the original resize scenarios rather than the entire campaign. Frames beyond the GL maximum cache texture size retain normal rendering but cannot use cached expose presentation.