Makie.jl
Makie.jl copied to clipboard
GLMakie screens resize after being updated?
Consider the following MWE:
using Makie, GLMakie
using Makie.GeometryBasics
begin
# this must be larger than the maximal size of a GLMakie window in at least one dimension
fig = Figure(resolution = (2500, 2500))
screen = display(fig)
@show GeometryBasics.widths(screen)
fig.scene.backgroundcolor[] = Makie.to_color(:black)
@show GeometryBasics.widths(screen)
end
This returns:
GeometryBasics.widths(screen) = (2500, 2500)
GeometryBasics.widths(screen) = (2500, 1942)
showing that the screen renders fine, but then resizes itself when some aspect of the screen is updated. This is a regression from previous behaviour since GLMakie was able to successfully render scenes whose resolution was larger than the display size.
This feature is really useful if one is rendering a scene which needs to be analysed as an image, for example simulating the diffraction pattern of a laser shining through a chamber containing some simulated organism.
Are you sure that this is a regression? I remember that this issue popped up ages ago, and it's pretty much not fixable since it's the window manager who resizes the window... Maybe we can render these still by hiding the window, that'd be worth a try...
Yeah, the odd thing is that this was working fine for the 3000x3000 px volume plots I was rendering in #2061, which was then dumping the rendered image into a PNG to debug. I could see that the Makie window was larger than the screen then.
Is there a good way to hide the window programmatically? I can try that out and report back.
You should be able to do screen = display(Screen(visible = false), fig).
Is this before or after #1771? Maybe there were some unintentional changes there
Specifically new behaviour after #1771. I will try that out though, thanks!