Skip to content

Conversation

@pfeiferj
Copy link
Contributor

On some desktop hardware the ui currently fails to start. This only happens when the _calculate_auto_scale function runs and thereby opens and closes a temporary window. The issue seems to be related to the OpenGLContext getting removed in the raylib close_window function. By directly destroying the glfw window the OpenGLContext does not get removed and the ui is able to start successfully.

@github-actions github-actions bot added the ui label Nov 26, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

raylib UI Preview

All Screenshots

@greatgitsby
Copy link
Contributor

greatgitsby commented Nov 26, 2025

seems like a hack to intentionally leave the gl context open when this method finishes

have you explored other fix attempts?

@pfeiferj
Copy link
Contributor Author

pfeiferj commented Nov 26, 2025

seems like a hack to intentionally leave the gl context open when this method finishes

have you explored other fix attempts?

The raylib close_window function doesn't provide a way to leave the context open, it seems like init_window and close_window are designed for an application with a single window that would completely shutdown after closing the window. I don't see any way to create and maintain an opengl context in the raylib api apart from the init_window/close_window commands or dropping into glfw. The only other way I could think of to open and close a window while maintaining the OpenGL Context would be to stop using init_window and instead manage the glfw layer from start to end. Another option would be to find another way to find the dimensions that this function grabs. Overall though, this seems like the most straightforward solution to the issue

@pfeiferj pfeiferj changed the title Raylib: Close the scaling detection window without uninitializing opengl UI: Close the scaling detection window without uninitializing opengl Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants