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 226 forks source link

Write documentation: Getting Pyrender Working in Windows 10 #176

Open GeorgeS2019 opened 3 years ago

GeorgeS2019 commented 3 years ago

For Windows users We get warning that pyrender 1.4.5 currently supports only pyopengl 3.1.0 The standard way to install pyopengl is from Christoph Gohlke site. They are 3.1.5 for python 3.5+ The Gohlke pyopengl comes with freeglut.dll which is not supported by pyrender (EGL for Window)

I hope I have understood correctly. If not, please point out where are my mistakes

Using Gohlke 3.15 pyopengl and pyrender 1.4.5, I could not get the example duck.py to work

OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenVertexArrays, check for bool(glGenVertexArrays) before calling

SimantoR commented 3 years ago

Odd, i downloaded pyrender from pip and it works fine on my win10 machine

GeorgeS2019 commented 3 years ago

@SimantoR thanks for providing feedback :-) ==> please try setting

os.environ["PYOPENGL_PLATFORM"] = "egl" or

pyrender.OffscreenRenderer => which someone forces to work in egl mode only

@SimantoR => also please share which version of PyOpenGL and PyOpenGL.Accelerate U use and the source.

SimantoR commented 3 years ago

Could you provide code for reproducability? Preferably with the resources your loading as well?

GeorgeS2019 commented 3 years ago

==> UPDATE

I could not get the example duck.py to work

OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenVertexArrays, check for bool(glGenVertexArrays) before calling

It turns out I need to specify python to run under Nvidia graphics card and not the integrated graphics card with graphics driver problem.

GeorgeS2019 commented 3 years ago

@SimantoR

Could you provide code for reproducability? Preferably with the resources your loading as well?

I am using the default example provided. I spent many hours testing pyrender in both windows and WSL environment with Xserver. In my experience, my integrated graphic card driver tends to be corrupted and setting python to run only in Nvidia graphics card seems to solve most of the problems

I am using this issue to share the problems I encounter so others could avoid.

SimantoR commented 3 years ago

I'm using PyOpenGL 3.1.0 which i think came as a dependency of Pyrender

Rennylex commented 2 years ago

I spent many hours testing pyrender in both windows and WSL environment with Xserver.

Hi mate, could you tell me how you " specify python to run under Nvidia graphics card and not the integrated graphics card"?

I am facing this problem: ImportError: ('Unable to load EGL library', 22, None, 126, None, 'EGL', None)

ghost commented 1 year ago

I meet this problem too. But when the GPU is available, this problem is solved. Maybe some version of PyOpenGL don't support CPU function.