Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Apple resolution fix #145

Closed
wants to merge 3 commits into from

Conversation

ndinsmore
Copy link

This makes the resolution KW work properly on OSX. It effectively disables the expanded Retina framebuffer and then gets rid of a lot of the "retina scaling". That may cause issue with high DPI screens on non-apple platforms, but as far as I could tell I don't think that would have been working.

This does dramatically improve performance on my machine, as I think that on a retina display it was actually rendering at 2x the native resolution to start with.
My machine went from unusable with a large window to being very ussable.

Allong with: JuliaPlots/AbstractPlotting.jl#563
this should close MakieOrg/Makie.jl#766

Nicholas R Dinsmore added 3 commits December 1, 2020 13:29
    added GLFW_COCOA_RETINA_FRAMEBUFFER
    fixed GLFW.Window to use proper resolution
   Disable apple sfactor in Monitor
   Added resolution to global_gl_screen
@georgematheos
Copy link

georgematheos commented Jan 22, 2021

I've run into the performance issues with GLMakie windows on MacOS as well.

@ndinsmore is this PR needed in addition to the already-merged PR (JuliaPlots/AbstractPlotting.jl#563) to fix the issue? And if so, is there anything holding back a merge?

@ndinsmore
Copy link
Author

@georgematheos this is the real performance fix, the fix in AbstractPlotting just made the reporting of resolution more accurate.

At the time it was written there was nothing holding it back. I appear to have a conflict now. I have been using my branch successfully for 2 months now.

@georgematheos
Copy link

@ndinsmore does #107 (which I believe includes the changes in #168) implement the same change as this PR? After #107, things are much more performant on my Mac.
(And thank you again for helping with this issue!)

@ffreyer
Copy link
Collaborator

ffreyer commented Feb 21, 2021

These changes are different from #107. #107 changed the postprocessing system so that you can turn things off (though it's not particularly accessible/well done imo). The performance gain you see from it is because it turned off SSAO by default. Not sure how much that saves on computation side relatively to base rendering, but it definitely frees up a lot of vram.

@jkrumbiegel
Copy link
Member

would this change effectively use 4 pixels of the retina screen for 1 pixel of the plot?

@ndinsmore
Copy link
Author

ndinsmore commented Mar 22, 2021

@jkrumbiegel The best way to think of it is that it uses one pixel of your rendered resolution with no subpixels rendering. So if you have your display set to a certain resolution it renders to that. So whatever "resolutions" your display supports is usually a rational fraction of the total sub-pixels.

Another important aspect is that this is not just retina displays but all monitors used by osx that support sub pixels.

Before this version of the pull I tried to get proper subpixel scaling working, but could not. The math was not working as I thought it should, in particular, I would get a window that was 1/2 my screen width, rendered at the full subpixel resolution of the monitor.

@SimonDanisch
Copy link
Member

Continued in MakieOrg/Makie.jl#1064

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolution KW not working properly on OSX with retina GLMakie.jl
5 participants