Retina issue on macOS (bug or ignorance?)



My app was working fine. Then I tried to adapt it to the Retina display. I added the High Resolution Capable = YES line to the .plist file and, indeed, everything became smaller.

So I duplicated both the width and height of the window in main.cpp
And that’s when things started acting strange.

An image which used to fill the whole screen now was no longer being drawn from (0,0) but appears arbitrarily translated in the Y-axis. Then I dragged the window to resize it slightly and, to my surprise, as soon as I released the mouse… the image started being drawn at the correct place (0,0).

So, something refreshed and corrected whatever was wrong.

I logged ofGetWidth() which starts by returning 1920 (the width defined in main.cpp) but when the window is slightly resized it suddenly changes to 2560 (which indeed seems to be the correct width at that size).

So either there is a bug or I’m not initialised things properly. Must I do anything else besides adding the line to the .plist file?

I even tried to use ofSetWindowShape() to change the window size programatically in the hope that it would solve the program but to no avail.

I’m using version 10.1.

Any suggestions is welcome!

Thanks in advance,


Hi, which macOS are you using? Mojave has several issues regarding the windowing, I do not use mojave, it might be the source of the problem.
Can you please provide the test code you are using so we can test it too?


I’m running Mojave :frowning:

My code is here:

I quit trying to adapt my app to Retina for now so I’m not stuck but, as you said, it’s not unlikely that it is something related to Mojave since I have another problem which, from what I could gather online, also seems to be related to Mojave:

2019-01-13 14:00:08.211714+0100 moldAppDebug[86840:4529660] [default] Unable to load Info.plist exceptions (eGPUOverrides)

This problem has been reported before here:

Although the app runs, there is clearly a problem because, for instance, in example vboExample I am supposed to see a difference in performance between ofMesh and ofVboMesh and yet there is no difference whatsoever.

Do you think these are things that must be corrected in macOS or will you try to find a way to correct them in OF?



There was a hack where the window was moved slightly, a pixel or so, when the app started, and it fixed several problems. you might want to try that while running it on retina mode. It might work. just call in the setup ofSetWindowPosition(x, y). if it does not work wait a few frames and call that in update.

if(ofGetFrameNum() == 3){
     ofSetWindowPosition(x, y);

OF depends on GLFW which is a multiplatform window manager. All these problems are really part of GLFW but some fixes also need to be made within OF. As I said I dont use Mojave, so I have not been helping on those fixes, but there’s been a lot of activity regarding it.


Thank you! That’s great to know! I will try it out!

I guess this is a good example of why I should be more careful and think twice before upgrading my OS…


certainly. I always wait a while, even a years before updating. I also tend to install the new OS on a different partition and keep the current one I have, test it and when it seems fine I switch.