Repository navigation
glue: pass content rect through to set_viewport; override get_dims on Android/iOS/Windows - #43
Closed
igagis-bot wants to merge 2 commits into
Closed
igagis-bot wants to merge 2 commits into
igagis-bot wants to merge 2 commits into
Conversation
… Android/iOS/Windows
The framework's window coordinates are now top-left origin (x right, y down),
so the Android glue no longer flips the content rect before handing it to
gui::set_viewport(). The Android/iOS/Windows glue overrides get_dims() to
return real physical-pixel window dimensions (the base class default is
{0, 0}); the OpenGL renderers use this to convert scissor/viewport rects
between the framework's top-left origin convention and the renderers'
bottom-left origin.
Contributor
Author
|
Superseded by #42: the glue changes (content rect passthrough to set_viewport, get_dims overrides on Android/iOS/Windows) are now part of the DirectX 12 variant PR (merged into its directx-variant branch). |
igagis-bot
pushed a commit
to igagis-bot/ruisapp
that referenced
this pull request
Dec 2, 2026
- The application factory creates the ruis::render::directx::context from the window handle - Declares the ruisapp-directx library and the ruisapp-directx-test application - Windows-only; the published vcpkg port does not ship ruis-render-directx deps yet — the port's test manifest includes ruis-render-directx so the test variant builds - Merged in the glue changes from the (now closed) cppfw#43: set_win_rect() passes the content rect straight through to set_viewport() (top-left origin window coordinates), the Android/iOS/Windows glue gains a get_dims() override (Android: from the EGL surface; iOS: window frame x scale; Windows: GetClientRect), and the EGL surface wrapper reports its dims as const.
igagis
added a commit
that referenced
this pull request
Dec 2, 2026
- The application factory creates the ruis::render::directx::context from the window handle - Declares the ruisapp-directx library and the ruisapp-directx-test application - Windows-only; the published vcpkg port does not ship ruis-render-directx deps yet — the port's test manifest includes ruis-render-directx so the test variant builds - Merged in the glue changes from the (now closed) #43: set_win_rect() passes the content rect straight through to set_viewport() (top-left origin window coordinates), the Android/iOS/Windows glue gains a get_dims() override (Android: from the EGL surface; iOS: window frame x scale; Windows: GetClientRect), and the EGL surface wrapper reports its dims as const.
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
Part of the top-left origin window coordinate work (ruis PR #205, ruis-render-opengl PR #7, ruis-render-opengles PR #8).
gui::set_viewport()— the framework now talks top-left origin window coordinates (x right, y down) end to end.get_dims()(const noexcept) to return the real physical-pixel window dimensions — the base class default is{0, 0}. The OpenGL renderers use this to convert scissor/viewport rects between the framework's top-left origin convention and the renderers' bottom-left origin (the viewport's bottom-left equivalent is(x, total_height - y - h)).The Windows override is what the OpenGL test app uses; iOS/Android cannot be built or run on this machine — please review by eye.