mmatl / pyrender

Easy-to-use glTF 2.0-compliant OpenGL renderer for visualization of 3D scenes.
http://pyrender.readthedocs.io/
MIT License
1.31k stars 225 forks source link

use wgl on Windows #167

Closed monsieurgustav closed 3 years ago

monsieurgustav commented 3 years ago

Offscreen rendering fails on Windows:

File "C:\Users\GuillaumeDev\anaconda3\envs\yokai\lib\site-packages\pyrender\offscreen.py", line 113, in render self._platform.make_uncurrent() File "C:\Users\GuillaumeDev\anaconda3\envs\yokai\lib\site-packages\pyrender\platforms\pyglet_platform.py", line 54, in make_uncurrent pyglet.gl.xlib.glx.glXMakeContextCurrent(self._window.context.x_display, 0, 0, None) AttributeError: module 'pyglet.gl' has no attribute 'xlib'

This PR use xlib if it actually exists and may fallback to wgl if found.