Fixes the scaling issue in example_sdl2_wgpu#9300
Closed
ypujante wants to merge 1 commit intoocornut:masterfrom
Closed
Fixes the scaling issue in example_sdl2_wgpu#9300ypujante wants to merge 1 commit intoocornut:masterfrom
ypujante wants to merge 1 commit intoocornut:masterfrom
Conversation
- enable HIGHDPI support (window flag) - use SDL_GetWindowSizeInPixels which returns the size to give to the WebGPU buffer (account for scaling factor)
ocornut
pushed a commit
that referenced
this pull request
Mar 13, 2026
Owner
|
Thank you! merged with fixes as 4a2e3cc |
Contributor
Author
|
Note that I am seeing the same kind of behavior as the GLFW issue you mentioned with this fix (you can see pixel changing when moving windows). So I am not sure what this is about, but most likely it is this Windows scaling... That being said now it looks identical to the GLFW version so at least it is far more usable! |
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.
@ocornut This is a PR for the issues you expressed in this comment (SDL2+WGPU looks extremely bad (screenshot).)
I checked the code and was able to find a fix that is pretty small. I tested it on Windows with scaling as well as on macOS with retina display.