forked from MakieOrg/Makie.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add some documentation about scalefactor, px_per_unit #1
Open
asinghvi17
wants to merge
18
commits into
jmert:jw/gl_linux_hidpi
Choose a base branch
from
MakieOrg:as/docs_for_gl_hidpi
base: jw/gl_linux_hidpi
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add some documentation about scalefactor, px_per_unit #1
asinghvi17
wants to merge
18
commits into
jmert:jw/gl_linux_hidpi
from
MakieOrg:as/docs_for_gl_hidpi
Conversation
This file contains 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
By separating the two concepts, we can create rasterized graphics at higher resolution than what is shown on screen. The window scale factor is used to scale the sizes of elements within the window (and on Linux and Windows, the window size itself from the requested logical sizes), and the px-per-unit scale factor dictates the size of the rasterized render.
This works around a crash that otherwise occurs when creating a screen directly with something like ```julia screen = GLMakie.Screen(resolution = (100, 100), visible = false) ``` I'm not sure why this is necessary, though, so that probably points at some subtle logic error in handling scaling factors and/or dimensions of windows and buffers.
so force the scale and px-per-unit factors to unity for the test.
This was causing problems with setting up the stream size for video outputs. Instead, just grab the scene size where necessary explicitly.
After identifying failing tests, closer reading suggests the line rendering shaders all work in normalized units that arise naturally from comparing the framebuffer size to resolution factor. This means adding additional scaling is unnecessary since the framebuffer size is already scaled.
- More explicit `range` to support older versions of Julia - Force a render of the figure before testing picking operations, since that doesn't happen implicitly when the sequence is not done with a visible plot interactively. - Use a less exact test for running within an Xvfb instance to support older versions of `xrdb` without the -get option.
Thanks, @asinghvi17. I've cherry-picked your commit and expanded the docs a bit more in MakieOrg#2544 |
jmert
force-pushed
the
jw/gl_linux_hidpi
branch
from
January 30, 2023 02:21
ebcac6d
to
d3a2b7f
Compare
jmert
force-pushed
the
jw/gl_linux_hidpi
branch
from
February 24, 2023 04:41
3f47986
to
5ba035c
Compare
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.
Adds some docs so that it's clear what each thing does.
(Note: I'm not 100% sure that what I wrote was correct, would appreciate if you could check that @jmert)