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

v3.3/glfw: handle GLFW_NO_WINDOW_CONTEXT error #391

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

dmitshur
Copy link
Member

The GLFW_NO_WINDOW_CONTEXT error code happens when a window without a context is passed to a function that requires it to have one. This is deemed a programmer mistake, something that this Go package currently handles by loudly panicking so the mistake is fixed sooner.

Apply the same treatment to this error, which was previously missed and resulted in a "please report this in the Go package issue tracker" message being printed alongside the panic.

Fixes #389.

The GLFW_NO_WINDOW_CONTEXT error code happens when a window without a
context is passed to a function that requires it to have one. This is
deemed a programmer mistake, something that this Go package currently
handles by loudly panicking so the mistake is fixed sooner.

Apply the same treatment to this error, which was previously missed
and resulted in a "please report this in the Go package issue tracker"
message being printed alongside the panic.

Fixes #389.
@dmitshur dmitshur requested a review from Jacalz January 17, 2024 06:54
@dmitshur
Copy link
Member Author

Thanks.

@dmitshur dmitshur merged commit a250818 into master Jan 18, 2024
@dmitshur dmitshur deleted the no-window-context-error branch January 18, 2024 00:05
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

Successfully merging this pull request may close these issues.

v3.3/glfw: CreateWindow can run into GLFW_NO_WINDOW_CONTEXT but doesn't accept it
2 participants