wayland: Set framebuffer scale when creating an OpenGL context#365
Open
lexi-lambda wants to merge 1 commit intoracket:masterfrom
Open
wayland: Set framebuffer scale when creating an OpenGL context#365lexi-lambda wants to merge 1 commit intoracket:masterfrom
lexi-lambda wants to merge 1 commit intoracket:masterfrom
Conversation
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.
Currently, on Wayland, creating an OpenGL context does not work as intended when high-DPI display scaling is enabled. Under such a configuration
get-gl-client-sizewill return scaled values (which is correct), but the framebuffer will be created with the unscaled values, resulting in a low-resolution render that is scaled up by the compositor. Additionally, passing the results ofget-gl-client-sizetoglViewportwill result in only a portion of the frame being rendered, which is inconsistent with other platforms.This PR fixes the issue by explicitly setting the framebuffer scale when creating the Wayland surface. I have tested on my machine and confirmed that it resolves the problem, but I am unfortunately not sure how to write a test case for this change, as I don’t think there is any way to observe the difference from within the Racket program.