Godot: MacOS: Moving Godot Editor Window from Retina Display to non Retina display does not resize the content appropriately

Created on 14 Jul 2016  Â·  30Comments  Â·  Source: godotengine/godot

Operating system or device - Godot version:
2.1 beta 20160712 osx

_Not reproducible with 2.0 stable version_

Issue description (what happened, and what was expected):
When moving the window from a 'zoomed' monitor (Retina Display) to a non zoomed (Full HD) monitor the window content is too big

Retina before:
image

After moving to Non Retina Monitor:
image

Steps to reproduce:
(Using a MacBook Pro MBP)

  • 1 External DVI monitor via Lightning Cable attached to MBP
  • Start Godot on the Retina screen (Builtin screen) and open a project
  • Move the window over to non retina screen
bug confirmed pr welcome core usability

Most helpful comment

I've been seeing the same behavior; here's how to work around it until it's fixed:

  • Right click the Godot app, select Get Info
  • Check Open in Low Resolution

low-res

It should resize correctly the next time you launch it.

All 30 comments

I've been seeing the same behavior; here's how to work around it until it's fixed:

  • Right click the Godot app, select Get Info
  • Check Open in Low Resolution

low-res

It should resize correctly the next time you launch it.

I see this is targeted to be fixed in 2.2. I reproduced it in 2.1.1. Confirmed that the "Open in low resolution" workaround works. Also the "set displays to mirrored" workaround works. This is under macOS 10.12.2, fwiw.

Note that it's likely not (a priori) macOS-specific. It just that only Macbook users tend to buy a laptop with a tiny screen and a ridiculously high resolution to finally use a huge but low resolution secondary monitor :P

Not by choice Akien, Apple doesn't sell anything larger then a 15" anymore.. :(

I've seen this before, not quite sure how to fix. I need someone with a
little more experience in OSX.

Resizing the whole UI sounds like a mess, so I was thinking about simply
scaling the contents by 2X and keep the internal render buffers the size of
the bigger monitor. Any help with this appreciated.

On Thu, Apr 6, 2017 at 3:20 AM, Bastiaan Olij notifications@github.com
wrote:

Not by choice Akien, Apple doesn't sell anything larger then a 15"
anymore.. :(

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/5688#issuecomment-292079832,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z20X_u0rj9wB8mdLI20Pkl623fbDgks5rtIQxgaJpZM4JMR4p
.

@reduz I'll try to find some time to dive into things, I have the equipment but I'm still learning the internals of Godot and am unsure where to start looking.

It;s also a bit of a pain that I would need to do this while I'm at work as that is where I have my extra monitor, I only ran into this today because I was quickly testing something there.

in theory it should be all in os_osx.mm

On Thu, Apr 6, 2017 at 9:37 AM, Bastiaan Olij notifications@github.com
wrote:

@reduz https://github.com/reduz I'll try to find some time to dive into
things, I have the equipment but I'm still learning the internals of Godot
and am unsure where to start looking.

It;s also a bit of a pain that I would need to do this while I'm at work
as that is where I have my extra monitor, I only ran into this today
because I was quickly testing something there.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/5688#issuecomment-292160387,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z2xSdSaC5j5tI-IM4WeZD1r0hDPCVks5rtNx1gaJpZM4JMR4p
.

@reduz yeah I can see there is only code in initialisation, wonder if that even does the right thing if you have the non-retina display as a primary.. I'll have to start playing with it later in the week when I have some spare time to hang back at work and test on my 2nd display there

i think godot tries to find any of the monitors with retina, then uses
higher dpi
which is why, i think UI should be all scaled down in the non retina one.

On Fri, Apr 7, 2017 at 7:16 PM, Bastiaan Olij notifications@github.com
wrote:

@reduz https://github.com/reduz yeah I can see there is only code in
initialisation, wonder if that even does the right thing if you have the
non-retina display as a primary.. I'll have to start playing with it later
in the week when I have some spare time to hang back at work and test on my
2nd display there

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/5688#issuecomment-292665044,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z29TcrqiAbhvAuuLxKVppOCzG5BzIks5rtrXXgaJpZM4JMR4p
.

Same exact issue for me with 10.12.5 and Godot 2.1.3. I can confirm that the 'Open in low resolution' workaround fixed the issue for me. Thanks!

@bruvzg @marcelofg55 Want to have a look at this one? It seems like a small laptop screen with Retina resolution coupled to a big external monitor with a low resolution is a fairly common use case among macbook users, so this one pops out quite often.

My suggested solution for this is to keep the OpenGL/Screen resolution rendering in retina size, and simply hack it so the window with non-retina display is shrunk 2X after rendering. Anything else is too complicated.

volunteers very welcome to work on this, I got my plate very full already

On Fri, Jul 28, 2017 at 10:09 AM, bruvzg notifications@github.com wrote:

windowDidChangeBackingProperties
https://developer.apple.com/documentation/appkit/nswindowdelegate/1419517-windowdidchangebackingproperties?language=objc
may help

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/5688#issuecomment-318647380,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z23B7Wz9EjEKMyIy4xJgKmJbAygg-ks5sSd1vgaJpZM4JMR4p
.

I’ve been wanting to look into this, i have this setup at work, just need
to find a day to hang back and work on Godot after work:)

On Fri, 28 Jul 2017 at 11:10 pm, Juan Linietsky notifications@github.com
wrote:

volunteers very welcome to work on this, I got my plate very full already

On Fri, Jul 28, 2017 at 10:09 AM, bruvzg notifications@github.com wrote:

windowDidChangeBackingProperties
<
https://developer.apple.com/documentation/appkit/nswindowdelegate/1419517-windowdidchangebackingproperties?language=objc

may help

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/godotengine/godot/issues/5688#issuecomment-318647380
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AF-Z23B7Wz9EjEKMyIy4xJgKmJbAygg-ks5sSd1vgaJpZM4JMR4p

.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/5688#issuecomment-318647644,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB2vabPUTj1ZwpdmDhfn1_MjvmeVTOftks5sSd21gaJpZM4JMR4p
.

>

Kindest regards,

Bastiaan Olij

https://www.facebook.com/bastiaan.olij
https://www.youtube.com/channel/UCrbLJYzJjDf2p-vJC011lYw
https://github.com/BastiaanOlij

As commented above by Deere, this works if the check-box for "Open in Low Resolution" is checked in the Get Info dialog. Additionally, I can then move the Godot window back and forth between an external (low-res) monitor and a built-in retina display, and the Godot window adjusts fine every time. Hence, so far this seems to be a complete fix.

When the "Open in Low Resolution" option is NOT checked, weird things happen when I drag the Godot window back and forth from from an external monitor (where the GUI elements are too large) to my built in retina display - sometimes everything resizes fine on the retina display, but sometimes it has some strange artifacts (but I'm on a MacBook Pro late-2016, and I've seen this with other apps as well) - but then resizing the window on the retina display causes it to redisplay correctly. But when I drag the window back to the low-res external monitor, the GUI panels inside the Godot window are messed up again.

I'm fairly new to OpenGL, and perhaps this is obvious and not useful, but when programming in OpenGL on a Mac, it is necessary to call glfwGetFramebufferSize() to obtain the actual window size after window creation and then reset the viewport with a call to glViewport() using the dimensions just obtained from the call to glfwGetFramebufferSize(). This is shown in the last two code chunks below:

    // The *desired* window dimensions under *non-retina* monitors.
    const GLint WIDTH=800, HEIGHT=600;

    // Create the window with desired dimensions.
    GLFWwindow *window = glfwCreateWindow(WIDTH, HEIGHT, "Window Label", nullptr, nullptr);

    // Get the *actual* window size on the display.
    int screenWidth, screenHeight;
    glfwGetFramebufferSize(window, &screenWidth, &screenHeight);

    // Set the *actual* window resolution size for the viewport.
    glViewport(0, 0, screenWidth, screenHeight);

I'm guessing that a "viewPort" is opened for each panel inside the Godot window, and that these are not being resized with the glViewport() call (or something equivalent) in the manner that is demonstrated in the above code (or perhaps they are being being resized without checking whether the screen the window is on is a non-retina display - or equivalently that the window dimensions have been scaled down).

I have no idea if this is helpful! Just thought I would add my observations and my thoughts on the issue.
-David

@datatoolbox Did you try the current master branch? It should be working fine there.

This is still happening in version 3.0.6 (on MacOS Mojave). Should this issue be reopened?
image

This is still happening in version 3.0.6 (on MacOS Mojave). Should this issue be reopened?
image

Similar here. 3.0.6 MacOS Mojave. Macbook Pro 15 & 4k ext. display

When I open the editor starting on my 4k monitor, the gui appears much smaller and scaled down. If I open it on my macbook pro 15" screen and move it over to my 4k monitor, it appears normal.

Still valid as per above comments and #23409.

Also noticed that when i do the workaround (opening the editor on my laptop screen, not the external 4k) that the game window when testing opens deep into the bottom right corner (as if centered on a larger screen) such that it is not always viewable. Sometimes it doesn't appear at all.

For now I changed the GoDot app to open in low resolution mode, which makes everything (editor and test window) work but it looks ugly.

I was going to report this issue for a brand new Macbook Pro I just got, but found this. The current beta build (v3.1beta1) still misrenders things, even in low res mode, for me when moving between screens. However, I did notice that if I just open Godot on my external monitor directly, it works. Just need to not switch between screens with the editor itself.

It's a general problem with retina displays, not only when switching between low- and high-res displays.

On 10.14.2, Gotot engine sometimes looks like this for me:

(it can be fixed by restarting Godot)

screen shot 2019-01-30 at 12 35 24 pm

Also having the same issue using Godot Mono 3.1.1 on Mojave 10.14.6 beta. The screen becomes completely unusable (either too big on the non-Retina display when coming from a Retina display, or too tiny when going from non-Retina to Retina display), when changing from one monitor to the next.

This is still an issue in 2020

MacOS 10.13.9
MacBook Pro 13-inch, 2016
Godot 3.1.1 stable

Moving from Non-retina to Retina causes the UI to be tiny. Moving from Retina to Non-retina causes UI to be huge and unusable.

Is there a way to solve this without implementing the ability to change the editor scale at run-time (which is difficult)?

On Jan 9, 2020, at 7:34 AM, Hugo Locurcio notifications@github.com wrote:

Is there a way to solve this without implementing the ability to change the editor scale at run-time (which is difficult)

Please remove me from your correspondence on these emails. I have no connection with Godot.

-David


David Daniel

[email protected]

Please remove me from your correspondence on these emails. I have no connection with Godot.

You have to do this yourself. You got notifications from GitHub because you commented on this issue: https://github.com/godotengine/godot/issues/5688#issuecomment-321408100
If you don't want to receive notifications, you can click the unsubscribe link in the email or at the right if the GitHub issue page.

A hint to all those that lost precious time like myself and dabbled with retina/non-retina displays, checking/unchecking "Open in Low Resolution", etc.:

There is simple setting to scale the editor interface: Menu ➔ Editor ➔ Editor preferences ➔ Interface ➔ Editor ➔ Display Scale … Simple if you know its there.

image

I had this problem with v3.2.1.stable.official. The fix from @jackmakesthings in https://github.com/godotengine/godot/issues/5688#issuecomment-233224964 worked for me.

Was this page helpful?
0 / 5 - 0 ratings