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

Standalone context interferes with pygame if I don't use with. #68

Open
sh1boot opened this issue Oct 13, 2024 · 0 comments
Open

Standalone context interferes with pygame if I don't use with. #68

sh1boot opened this issue Oct 13, 2024 · 0 comments

Comments

@sh1boot
Copy link

sh1boot commented Oct 13, 2024

I wanted to create a standalone context to use under pygame, but whenever I used that context it would break pygame's display and I'd just get a blank screen. I assume that pygame was using gl in its back-end even though I wasn't asking to use its gl context from moderngl.

It turns out I needed to wrap my work in a with context block, which is an idea I got from a random page I saw using it, but I don't really know why. Or more imporantly, I don't know what the rule is saying when or why I should do this. None of the examples do it.

Is this canonical, or is it just a weird, lucky side effect that it made things work in my case?

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

1 participant