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

GLMakie screens resize after being updated? #2063

Closed
asinghvi17 opened this issue Jun 16, 2022 · 7 comments
Closed

GLMakie screens resize after being updated? #2063

asinghvi17 opened this issue Jun 16, 2022 · 7 comments
Labels
GLMakie This relates to GLMakie.jl, the OpenGL backend for Makie. maybe wontfix TODO: review regression This issue describes a regression from a previous version or commit.

Comments

@asinghvi17
Copy link
Member

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.

@asinghvi17 asinghvi17 added GLMakie This relates to GLMakie.jl, the OpenGL backend for Makie. regression This issue describes a regression from a previous version or commit. labels Jun 16, 2022
@SimonDanisch
Copy link
Member

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...

@asinghvi17
Copy link
Member Author

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.

@ffreyer
Copy link
Collaborator

ffreyer commented Jun 17, 2022

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

@asinghvi17
Copy link
Member Author

Specifically new behaviour after #1771. I will try that out though, thanks!

@ffreyer
Copy link
Collaborator

ffreyer commented Aug 23, 2024

@SimonDanisch Is this something we are planning on fixing or is visible = false / save(size = ...) / record(size = ...) the way to handle this?

@ffreyer ffreyer added the maybe wontfix TODO: review label Aug 23, 2024
@SimonDanisch
Copy link
Member

As far as Im concerned, the windows window manager does this and I don't think there's any hack around it besides colorbuffer and friends

@ffreyer
Copy link
Collaborator

ffreyer commented Aug 23, 2024

Ok, closing this with the suggestion of using visible = false, save or record then

@ffreyer ffreyer closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GLMakie This relates to GLMakie.jl, the OpenGL backend for Makie. maybe wontfix TODO: review regression This issue describes a regression from a previous version or commit.
Projects
None yet
Development

No branches or pull requests

3 participants