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

wasabi2d HEAD doesn't work on Python 3.11+ due to reliance on old moderngl #79

Open
larryhastings opened this issue Dec 9, 2023 · 1 comment

Comments

@larryhastings
Copy link

As per wasabi2d's requirements.txt, the current HEAD requires

    moderngl==5.6.*

This version is already more than a year out of date; moderngl 5.7 shipped in October of 2022, and the current release is 5.8.2.

Unfortunately, if you attempt to build moderngl 5.6.* for Python 3.11 you get a compilation error. Python 3.11 changed the Py_TYPE macro so it can no longer be used as an l-value (used for assignment), and this is something moderngl still did in 5.6. (The release notes for moderngl 5.7 say that it now supports 3.11.)

wasabi2d requires this old version of moderngl because it relies on a symbol named context, which moderngl no longer exports. I don't know what the old symbol did, but I suspect there's a modern equivalent. (moderngl now exports symbols called create_context and create_standalone_context, maybe one of those would create the needed context object?)

@einarf
Copy link

einarf commented Jan 16, 2024

Assuming pygame make the GL context you just need to call moderngl.create_context() to get the Context instance (attached to the context pygame created. Nothing more complicated.

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