Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text buggy with immediate viewports across monitors with different scales #3664

Closed
emilk opened this issue Nov 30, 2023 · 0 comments · Fixed by #3666
Closed

Text buggy with immediate viewports across monitors with different scales #3664

emilk opened this issue Nov 30, 2023 · 0 comments · Fixed by #3666
Labels
bug Something is broken viewports multiple viewports, viewports API

Comments

@emilk
Copy link
Owner

emilk commented Nov 30, 2023

if you have two monitors with different native scales, then immediate viewports will cause the text to look messed up for the parent viewport:

image

I'm not sure why this is not a problem for deferred viewports; it's likely some state that is not properly restored when switching to/from an immediate viewport child.

The solution requires having one Fonts per specific pixels_per_point in Context.
We also need to do book-keeping of changes to the font atlas texture in a new, better way.
We really should use different font ids for the textures for the different pixels_per_point, but that will require a pretty deep change.

@emilk emilk added bug Something is broken viewports multiple viewports, viewports API labels Nov 30, 2023
@emilk emilk added this to the 0.24.1 milestone Nov 30, 2023
@emilk emilk modified the milestones: 0.24.1, 0.25.0 Nov 30, 2023
emilk added a commit that referenced this issue Nov 30, 2023
Attempted fix for #3664
but it is not enough
@emilk emilk changed the title Text buggy with immediate viewports across monitors with different scales Text and textures buggy with immediate viewports across monitors with different scales Nov 30, 2023
@emilk emilk changed the title Text and textures buggy with immediate viewports across monitors with different scales Text buggy with immediate viewports across monitors with different scales Nov 30, 2023
emilk added a commit that referenced this issue Nov 30, 2023
* Closes #3664

Bonus: optimize color conversions and font atlas upload, especially in
debug builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken viewports multiple viewports, viewports API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant