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

[gemglfw3window] default framebuffer size #390

Closed
60-hz opened this issue Dec 13, 2023 · 3 comments
Closed

[gemglfw3window] default framebuffer size #390

60-hz opened this issue Dec 13, 2023 · 3 comments
Assignees

Comments

@60-hz
Copy link
Contributor

60-hz commented Dec 13, 2023

When creating a new window under macos M1, the object return a big screen and "framebuffersize 2560 1832" by default rather than 500 500 under windows / linux.

This system inconsistency might be of the apple retina display.

@umlaeute umlaeute self-assigned this Dec 13, 2023
@umlaeute
Copy link
Owner

that is pretty weird, as i'm sure i mostly use the default window size when testing on macOS (Ventura/arm64) and i think i would have noticed (it's not a Retina display however)

@umlaeute
Copy link
Owner

i've checked again, and now see:

on macOS (Ventura, and presumably yours as well), for whatever reasons, [gemglfw3window] ignores any window dimension set before creating the window (including the default size of 500x500) and instead uses the size of the last created window.

i'm not exactly sure where this comes from (either macOS being clever; or some problem with the context sharing; or some other GLFW issue (though i haven't found anything related bug report yet).

in any case, the code is trying to set the correct dimension when creating the window:

m_window=glfwCreateWindow(width, height,
m_title.c_str(),
monitor,
NULL);

@umlaeute
Copy link
Owner

ah i think i've found it:

we are doing

glfwWindowHintString(GLFW_COCOA_FRAME_NAME, "Gem");

which, according to the docs:

[is the] name to use for autosaving the window frame

so the window information gets autosaved by macOS and our size hint gets ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants