Thanks for fast response. On my mac, if I do full screen with my app, the value from glfwGetFramebufferSize is too big by a factor of two. The blit succeeds, but the result is only the lover left part of my offline rendering. If I do windowed it works… on my mac at least. If I divide the result from glfwGetFramebufferSize by two, I get the result I want.
Just to clarify, the blit always succeeds and the offline rendering does too. It’s just that I can’t get the correct dimensions for the blit.
I’ve tried frambufferSize, windowSize, disabling the COCOA thing in all possible combinations, and while I can get it to work on my own Imac in both windowed and full screen, other mac users will have issues instead.
I see you are using GL11.GL_FALSE rather than GLFW_FALSE which indicates you are using the Java bindings. These are likely the same so that shouldn’t be an issue.
That seems odd - if you are asking for 2x the framebuffer I would have expected you get the whole framebuffer but in only one half. What size are you using for the other parameters and framebuffer - this sounds like the destination size or framebuffer size is wrong?
Some further questions for debugging this:
What version of GLFW are you using & have you tried this with the latest version of GLFW?
Have you checked the returned fullscreen framebuffer size against the monitors actual resolution (and not the screen coordinates)?
where defaultFB is the values from
IntBuffer w = BufferUtils.createIntBuffer(1);
IntBuffer h = BufferUtils.createIntBuffer(1);
glfwGetFramebufferSize(window, w, h);
Coo sc = (new Coo(w.get(), h.get()));
So I’m confounded. It doesn’t make sense. The result is always the same no matter what resolution I pick with full screen mode. Possibly it could be an opengl state being applied to the blit?
The glfwVersionString returns 3.4 cocoa for me.
I’m not sure I know what this means? The window size is always half of my FB size when going full screen. glfwGetWindowSize returns glfwGetFramebufferSize/2. It’s like its pretending to be HDPI, but maybe it isn’t?
The system info of my mac says it’s 4096 x 2304 . And it’s retina.
When I launch, glfwGetVideoMode(glfwGetPrimaryMonitor()) says my resolution is 2304x1296
glfwGetVideoModes(glfwGetPrimaryMonitor()) returns resolutions from 640x480 -> 4096x2304
If I launch a full screen window, glfwGetFramebufferSize gives me double the numbers. I.e. window = 4096x2304, FB = double, window = 2304x1296, FB = 4096x2304
If I launch a windowed window with 2304x1296 in resolution, I get the same size framebuffer.
If I do glfwWindowHint(GLFW_COCOA_RETINA_FRAMEBUFFER, GL11.GL_FALSE); I get the correct results even in full screen.
Unfortunately, I’m tied to LWJGL’s java wrapper, so I can’t update any further. I’m kind of hoping I’ve overlooked something. seems unlikely there would be a bug and I’d be the first to spot it.
I don’t know what the resolution numbers mean though. This is a standard Imac. Even with retina 8x4 k sounds a bit high to me. It’s more likely 2304x1296 and 4096x2304?
Before I launch into full screen with 4096x2304, I do indeed see the desktop switching to a much higher resolution, which looks like a transition from 2304x1296 -> 4096x2304. Definitely not 8000x4000 though.