# Strange behaviour on Retina Macs

**URL:** <https://discourse.glfw.org/t/strange-behaviour-on-retina-macs/2449>\
**Category:** support\
**Created:** [September 12, 2023, 9:50am UTC](https://discourse.glfw.org/t/strange-behaviour-on-retina-macs/2449 "2023-09-12T09:50:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lefty](https://avatars.discourse-cdn.com/v4/letter/l/85e7bf/32.png) [@lefty](https://discourse.glfw.org/u/lefty)\
**Post date:** [September 12, 2023, 9:50am UTC](https://discourse.glfw.org/t/strange-behaviour-on-retina-macs/2449/1 "2023-09-12T09:50:27Z")

</div>

I am testing my game on a Mac with a resolution of 2560 x1600 and am getting some strange behaviour. The frame buffer size reported by glfwGetFramebufferSize is always 1650 x 1050, regardless of which resolution I set with glfwCreateWindow, or if I set GLFW\_COCOA\_RETINA\_FRAMEBUFFER or not.  
I do not understand why the frame buffer is 1650 x 1050. It should either be 2560x1600, or 1280 x 800 depending if retina is enabled.

The GLFW\_COCOA\_RETINA\_FRAMEBUFFER setting seems to have no effect at all. The performance of the game is equally bad, if it’s enabled or disabled.

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [September 15, 2023, 3:37pm UTC](https://discourse.glfw.org/t/strange-behaviour-on-retina-macs/2449/2 "2023-09-15T15:37:11Z")

</div>

There appear to be a [number of issues related to retina displays with the recent ARM Mac hardware (M1 etc.)](https://github.com/glfw/glfw/issues?q=is%3Aissue+is%3Aopen+retina).

---

<div class="post-metadata">

**Author:** ![lefty](https://avatars.discourse-cdn.com/v4/letter/l/85e7bf/32.png) [@lefty](https://discourse.glfw.org/u/lefty)\
**Post date:** [September 15, 2023, 4:02pm UTC](https://discourse.glfw.org/t/strange-behaviour-on-retina-macs/2449/3 "2023-09-15T16:02:49Z")

</div>

Thanks for the answer.  
The mac that I am having problems with is actually Intel, not ARM

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [September 15, 2023, 5:06pm UTC](https://discourse.glfw.org/t/strange-behaviour-on-retina-macs/2449/4 "2023-09-15T17:06:02Z")

</div>

What version of OSX are you on, and what version of GLFW are you using?

If you haven’t yet tried using the latest from Github, then it would potentially be worth trying that.

However it looks like your issue is related to:

> <https://github.com/glfw/glfw/issues/1800>
>
> Hello!
> 
> I'm rendering a bunch of stuff to a FBO and when I'm done I'm blitting… to the default FB.
> This works smooth, except for some mac users. Behavior seems a bit erratic.
> 
> The problem is I'm not getting the correct framebuffer size glfwGetFramebufferSize. They are doubled.
> 
> glBlitFramebuffer(0, 0, offlineW, offlineH, 0, 0, defaultFBW, defaultFBH, GL\_COLOR\_BUFFER\_BIT, GL\_NEAREST);
> where defaultFB is the values from glfwGetFramebufferSize.
> 
> On my IMac listed as (Retina 4K, 21.5-inch, 2017), the display is stated to be 4096 x2304.
> 
> glfwGetVideoModes(glfwGetPrimaryMonitor()) returns resolutions from 640x480 -\> 4096x2304
> 
> If I launch a windowed window with any resolution, I get the same size framebuffer. The blit is working as expected. 
> 
> If I launch a full screen window, glfwGetFramebufferSize gives me double the numbers. I.e. window = 4096x2304, FB = double, window = 2304x1296, FB = 4096x2304 and the result is the lower-left quadrant of the offline FBO on the whole screen.
> 
> I can solve this by: glfwWindowHint(GLFW\_COCOA\_RETINA\_FRAMEBUFFER, GL11.GL\_FALSE);
> But this sadly doesn't solve it for some other mac users.
> 
> So, I'm thinking, as a layman...
> 
> Should glfwGetVideoModes(glfwGetPrimaryMonitor()) really return displaymodes \> 2304x1296 for me?
> Maybe they should, but I'm still getting too big framebuffers sizes. The x2 factor is consistent on every full screen resolution I'm picking.
> 
> I hope this explains it. I'm using lwjgl, so I'm tied to their latest wrapper.
> 
> I'm also interested if there is a potential workaround. I've tried dividing with glfwGetWindowSize and stuff like that, but getting inconsistent results with different macs, so I stopped.
> 
> And thanks for your great work!

It might be worth reporting your OS, Mac hardware and test results there.

---

<div class="post-metadata">

**Author:** ![lefty](https://avatars.discourse-cdn.com/v4/letter/l/85e7bf/32.png) [@lefty](https://discourse.glfw.org/u/lefty)\
**Post date:** [September 19, 2023, 12:04am UTC](https://discourse.glfw.org/t/strange-behaviour-on-retina-macs/2449/5 "2023-09-19T00:04:39Z")

</div>

I am using latest release GLFW and OSX 12 something. Unfortunately, I only had temporary access to a friend’s machine, so I can’t really test it fully.

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [September 19, 2023, 12:46pm UTC](https://discourse.glfw.org/t/strange-behaviour-on-retina-macs/2449/6 "2023-09-19T12:46:43Z")

</div>

I only have macOS 10.13 and no retina display, so cannot investigate this issue myself. From what I recall there were changes in macOS 11+ which broke some features of GLFW, and this may be one of them.
