Skip to content

wayland: Set framebuffer scale when creating an OpenGL context#365

Open
lexi-lambda wants to merge 1 commit intoracket:masterfrom
lexi-lambda:wayland-egl-buffer-scale
Open

wayland: Set framebuffer scale when creating an OpenGL context#365
lexi-lambda wants to merge 1 commit intoracket:masterfrom
lexi-lambda:wayland-egl-buffer-scale

Conversation

@lexi-lambda
Copy link
Copy Markdown
Member

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-size will 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 of get-gl-client-size to glViewport will 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant