-
Notifications
You must be signed in to change notification settings - Fork 225
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
module 'pyglet.gl' has no attribute 'xlib' #117
Comments
We are having the same issue |
any input on this @mmatl ? |
Changing line 53 in pyglet_platform.py to |
Thanks for the advice, however this now results in another error:
I think xlib is not meant to be used in Windows in the first place |
Yup, it looks like you're right: XLib is not meant to be used on Windows. Looking at all the other pyglet.gl.xlib calls they are all done using a try block as they may be unsupported. I must say though that I'm a complete noob on XLib, so don't take my word for it. As far as I can see make_uncurrent() is a cleanup operation to allow for multi-threading. If you don't care for it you can give it the same try-block treatment as other xlib calls: def make_uncurrent(self):
try:
import pyglet.gl.xlib
pyglet.gl.xlib.glx.glXMakeContextCurrent(self._window.context.x_display, 0, 0, None)
except:
pass I've done a couple of tests and everything works on my side. |
That makes a lot of sense. Somehow i thought there should be a platform-dependent version that mirrors thanks see request #124 |
did this ever get resolved? I still get the error "AttributeError: module 'pyglet.gl' has no attribute 'xlib'" when using the example file. |
With the new version 0.1.40 on windows (and possibly macOS, haven't tested) the offscreen renderer fails with:
Old versions <= 0.1.39 were fine
Sample code:
The text was updated successfully, but these errors were encountered: